getAll

Get all data's inserted to your collection's

getAll((data)=> {}, (error)=> {})

How to use:

my_collection.getAll(
    (data) =>  // data can access here,
    (error) => alert(error) 
);

Arguments:

parameter

required

types

success callback

yes

function

failure callback

yes

function

Example:

import React,{useEffect} from 'react';
import {Text} from 'react-native';
import {Pleex} from 'pleex';

const App = () => {
  
  // Create collection
  const my_collection = Pleex.collection('myCollection');
  
  // Get all data saved
  my_collection.getAll(
    (data) => console.table(data),
    (error) => console.log(error)
  );
  
  return (
    <>
      <Text>Try getAll api</Text>
    </>
  );

};

export default App;

Last updated