redux-simple-localstorage
Ridiculously simple implementation for serialising the entire Redux store to local storage and retrieving it on application restart.
Installation
npm install --save redux-simple-localstorage
Usage
The module exports a single function. Call that with the localStorage key, and you get an object with a read
and write
method:
const readwrite = ;
Now use write
as a middleware and the result of read
as initial state when you define your store:
;const readwrite = ; ;; const store = createStorerootReducer || initialState;
License
MIT