1.0.2 • Published 3 years ago
@lrnz09/react-native-storage v1.0.2
@lrnz09/react-native-storage
Wrapper for AsyncStorage with memory cache
Installation
npm install @lrnz09/react-native-storage
or
yarn add @lrnz09/react-native-storage
Usage
import { Storage } from '@lrnz09/react-native-storage'
// ...
const item = await Storage.getItem<number>('foobar')
or
import { useStorage } from '@lrnz09/react-native-storage'
// ...
const [item, setItem] = useStorage<number>('foobar')
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT