react-native-async-storage-wrapper
v1.0.0
Published
An Async Storage utility wrapper for React Native projects thru the initiative of Ingenuity Labs.
Downloads
6
Readme
react-native-async-storage-wrapper
An Async Storage utility wrapper for React Native projects thru the initiative of Ingenuity Labs.
Installation
$ npm install --save react-native-async-storage-wrapper
Usage
AsyncStorage
is a collection of utility methods designed to simplify storing of an object to React Native's AsyncStorage
module. It is composed of three(3) methods.
getObjectWithIdentifier(identifier)
Retrieves the corresponding object of the provided
identifier
from the storage. It returns aPromise
object wherein the object is returned when resolve, else, you need to catch the error when it failed to fetch the object.
removeObjectWithIdentifier(identifier)
Removes the corresponding object of the provided
identifier
to the storage, else, you need to catch the error when it failed to remove the object.
setObjectWithIdentifier(object, identifier)
Stores the corresponding
object
with its givenidentifier
to the storage, else, you need to catch the error when it failed to store the object.
License
ISC © Jason Jon E. Carreos