2.0.0-rc.0 • Published 4 years ago
@react-native-community/async-storage-backend-web v2.0.0-rc.0
Storage Backend: Web
An AsyncStorage backend, targeting web platform. Uses either localStorage
or sessionStorage
.
Installation
$ yarn add @react-native-community/async-storage@next
$ yarn add @react-native-community/async-storage-backend-web@next
Usage
import WebStorage from '@react-native-community/async-storage-backend-web';
import AsyncStorageFactory from '@react-native-community/async-storage';
type MyModel = {};
const webStorage = new WebStorage(true);
const storage = AsyncStorageFactory.create<MyModel>(webStorage);
export default storage;
Options
WebStorage
accepts a single boolean
argument, deciding if sessionStorage
should be used instead of localStorage
. Default is false
.
License
MIT.
2.0.0-rc.3
4 years ago
2.0.0-rc.2
4 years ago
2.0.0-rc.1
4 years ago
2.0.0-rc.0
4 years ago
0.0.0
4 years ago