https://github.com/n7olkachev/react-native-sync-storage
Sync storage for react native
https://github.com/n7olkachev/react-native-sync-storage
react-native storage sync-storage
Last synced: 12 months ago
JSON representation
Sync storage for react native
- Host: GitHub
- URL: https://github.com/n7olkachev/react-native-sync-storage
- Owner: n7olkachev
- Created: 2016-09-06T15:38:05.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-07T09:08:53.000Z (almost 10 years ago)
- Last Synced: 2024-08-08T16:14:36.304Z (almost 2 years ago)
- Topics: react-native, storage, sync-storage
- Language: JavaScript
- Size: 1.95 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-sync-storage
It is simple wrapper around `AsyncStorage` with sync `get`, `set`, `remove` methods and background syncing with `AsyncStorage`.
# Usage
```js
import storage from 'react-native-sync-storage'
...
await storage.init // somewhere where you can wait for loading storage
...
storage.get('property')
storage.set('property', 2333)
storage.remove('property')
```
Note that `set` and `remove` methods return promise which is resolved on syncing with `AsyncStorage`.