From d9e51fe2cbc3cf4dc9c767232f33e27dfc3f07e1 Mon Sep 17 00:00:00 2001 From: jero Date: Thu, 10 Oct 2019 22:34:46 +0300 Subject: [PATCH] refactor(store/index.tsx): use dynoStore's reloadStore we're not replacing the whole store's reducer when hot reloading, instead we're just letting dynoStore handle that for us improves #43 --- src/app/store/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/store/index.tsx b/src/app/store/index.tsx index 4388f8ef..cc9b6be7 100644 --- a/src/app/store/index.tsx +++ b/src/app/store/index.tsx @@ -4,9 +4,9 @@ const store = configureStore(); if (process.env.NODE_ENV !== 'production') { if (module.hot) { - module.hot.accept('store/reducers', () => + module.hot.accept('~/store/config/dynoStore', () => // eslint-disable-next-line implicit-arrow-linebreak, global-require - store.replaceReducer(require('~/store/reducers').default), + require('~/store/config/dynoStore').default.reloadStore(), ); } }