redux-localstorage-saver
Redux middleware for automatical save actions to localStorage with restore by action
Install
npm install redux-localstorage-saver
Usage
Init store:
;; ; const SAVED_ACTIONS = 'FIRST_ACTION2SAVE' 'SECOND_ACTION2SAVE'; const store = ;
Or you can use extended config:
const config = items: <array of saved actions> serialize: <serialize
Restore state
For restore state you need dispatch plain function "restore":
; store;