watercress-react-native
v1.0.0
Published
Simple AsyncStorage wrapper for React Native
Downloads
4
Maintainers
Readme
Watercress ☘️
Simple AsyncStorage wrapper for React native.
Just install:
npm i watercress-react-native --save
Then import:
import * as cress from 'watercress-react-native';
And use:
cress.set('cress', 'water').then(() => null)
cress.get('cress').then(() => null)
cress.rm('cress').then(() => null)
Every method returns promise. You also can pass JSON as a second parameter for set method and it will be stringifyed. Also, get method returns parsed JSON if value is JSON.
Wow, so cool, such innovation.