Merge pull request #24 from MyEtherWallet/hot_reload

Keep redux state across hot module reloads
This commit is contained in:
Daniel Ternyak 2017-07-03 12:30:42 -05:00 committed by GitHub
commit 57fe301af6
1 changed files with 4 additions and 2 deletions

View File

@ -15,10 +15,10 @@ import notificationsSaga from './sagas/notifications';
import 'assets/styles/etherwallet-master.less';
const sagaMiddleware = createSagaMiddleware();
let store;
const configureStore = () => {
let sagaApplied = applyMiddleware(sagaMiddleware);
let store;
let middleware;
if (process.env.NODE_ENV !== 'production') {
@ -54,5 +54,7 @@ const renderRoot = Root => {
renderRoot(Root);
if (module.hot) {
module.hot.accept();
module.hot.accept('reducers/index', () =>
store.replaceReducer(require('reducers/index').default)
);
}