Redux Persistent State Snapshot
Middleware to persist your state in a Redux app.
npm install --save redux-persistent-state-snapshot
Motivation
Persist a part (for example your UI State) of your State tree.
Usage
; const reduxStateSnapshot = 'reduxStateSnapshot'; const persistentStateSnaphot = ; //apply the middlewareconst finalCreateStore = createStore; { //the default serialization is JSON.stringify --> so use JSON.parse to deserialize const stateSnapshot = JSON; const finalInitialState = ...initialState ...stateSnapshot ; //one way to inject your saved Data when the application is mounted is to pass it as the initialState to the store const store = ; //but you could also create an action on the root component on componentWillMount... return store;}