Pleex
Search…
removeItem
Find and remove objects

removeItem({object to delete} , (success)=> {}, (error)=> {})

How to use:

1
my_collection.removeItem(
2
{key: value},
3
() => // removed successfully,
4
(error) => alert(error)
5
);
Copied!

Arguments:

parameter
required
types
object to remove
yes
object
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.removeItem(
12
{ age: 12 },
13
() => // Success,
14
(error) => alert(error)
15
);
16
17
return (
18
<>
19
<Text>Try remove Item api</Text>
20
</>
21
);
22
23
};
24
25
export default App;
Copied!