- Notifications
You must be signed in to change notification settings - Fork1
peterpme/react-native-asyncstorage
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
📬 📫 🗄 Declarative AsyncStorage component for React Native
yarn add react-native-asyncstorage
or
npm install --save react-native-asyncstorage
itemKey:stringrender:{loading:boolean,value:string|object,error:string}
itemKey:stringitemValue:string|objectrender:{loading:boolean,value:string|object,error:string}
- Fetch
usernamefromAsyncStoragebefore rendering the rest of your app
<AsyncStorage.GetItemitemKey='username'render={({ loading, value, error})=>{if(loading)return<AppLoading/>return(<Viewstyle={styles.container}><Text>Welcome to my app, ${value}</Text></View>)}}/>
- multiGet & multiSet support for multiple keys
Thanks to@tkh44 for the idea and his localforage version. He makes a lot of great shit, follow him onTwitter
About
📬 📫 🗄 Declarative AsyncStorage component for React Native
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.