Redux Async Initial State
npm install --save redux-async-initial-stateWhat? Why?
...
const initialState = JSON.parse(localStorage.getItem('state'));
const store = storeCreator(reducer, initialState);Usage
npm install --save redux-async-initial-stateimport { createStore, combineReducers } from 'redux'
import * as reducers from 'reducers'
const reducer = combineReducers(reducers)
const store = createStore(reducer)Partial replace
Reducer
Last updated