redux-persist-node-storage
v2.0.0
Published
Redux persist adaptor for Node local storage
Downloads
9,897
Maintainers
Readme
Redux persist node storage
Storage adaptor to use node-localstorage with redux-persist, by implementing the needed methods: setItem
, getItem
, removeItem
and getAllKeys
install
Simply run:
npm install --save redux-persist-node-storage
usage
import { AsyncNodeStorage } from 'redux-persist-node-storage'
import { persistStore, autoRehydrate } from 'redux-persist'
const store = createStore(reducer, undefined, autoRehydrate())
persistStore(store, { storage: new AsyncNodeStorage('/tmp/storageDir') })