mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
Keep redux state across hot module reloads
This commit is contained in:
parent
2acd78473d
commit
727a6d3975
@ -15,10 +15,10 @@ import notificationsSaga from './sagas/notifications';
|
|||||||
import 'assets/styles/etherwallet-master.less';
|
import 'assets/styles/etherwallet-master.less';
|
||||||
|
|
||||||
const sagaMiddleware = createSagaMiddleware();
|
const sagaMiddleware = createSagaMiddleware();
|
||||||
|
let store;
|
||||||
|
|
||||||
const configureStore = () => {
|
const configureStore = () => {
|
||||||
let sagaApplied = applyMiddleware(sagaMiddleware);
|
let sagaApplied = applyMiddleware(sagaMiddleware);
|
||||||
let store;
|
|
||||||
let middleware;
|
let middleware;
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
@ -54,5 +54,7 @@ const renderRoot = Root => {
|
|||||||
renderRoot(Root);
|
renderRoot(Root);
|
||||||
|
|
||||||
if (module.hot) {
|
if (module.hot) {
|
||||||
module.hot.accept();
|
module.hot.accept('reducers/index', () =>
|
||||||
|
store.replaceReducer(require('reducers/index').default)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user