Pleex
Search…
getAll
Get all data's inserted to your collection's

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

How to use:

1
my_collection.getAll(
2
(data) => // data can access here,
3
(error) => alert(error)
4
);
Copied!

Arguments:

parameter
required
types
success callback
yes
function
failure callback
yes
function

Example:

1
import React,{useEffect} from 'react';
2
import {Text} from 'react-native';
3
import {Pleex} from 'pleex';
4
5
const App = () => {
6
7
// Create collection
8
const my_collection = Pleex.collection('myCollection');
9
10
// Get all data saved
11
my_collection.getAll(
12
(data) => console.table(data),
13
(error) => console.log(error)
14
);
15
16
return (
17
<>
18
<Text>Try getAll api</Text>
19
</>
20
);
21
22
};
23
24
export default App;
Copied!
Last modified 2yr ago