Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

redux-persist-node-storage

pellejacobs35.1kMIT2.0.0TypeScript support: included

Redux persist adaptor for Node local storage

redux, redux-persist, localstorage

readme

Redux persist node storage

Travis branch npm version npm downloads

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') })