@hadx/offline-storage
v0.0.3
Published
@hadx/offline-storage
Downloads
2
Readme
Hadex Offline Storage
Usage
import AsyncStorage from '@react-native-community/async-storage';
import { LocalStorage } from 'node-localstorage';
import OfflineStorage from '@hadx/offline-storage';
/* React Native */
OfflineStorage.initialize({
storage: AsyncStorage,
name: 'root'
}).then(() => {
console.log('Offline Storage initialized')
});
/* Node */
const localStorage = new LocalStorage('./storage');
OfflineStorage.initialize({
storage: localStorage,
name: 'root'
}).then(() => {
console.log('Offline Storage initialized')
});