An open API service indexing awesome lists of open source software.

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

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`.