react-native-asyncstorage
Declarative AsyncStorage component for React Native
Installation
yarn add react-native-asyncstorage
or
npm install --save react-native-asyncstorage
API
- AsyncStorage.GetItem
- AsyncStorage.SaveItem
Usage Examples
Fetch apiToken from AsyncStorage
before loading the rest of the app
<AsyncStorage.GetItem ='apiToken' =/>
Shoutout
Thanks to @tkh44 for the idea and his localforage version. He makes a lot of great shit, follow him on Twitter