Skip to content

Commit

Permalink
refactor(store/index.tsx): use dynoStore's reloadStore
Browse files Browse the repository at this point in the history
we're not replacing the whole store's reducer when hot reloading, instead we're just letting
dynoStore handle that for us

improves #43
  • Loading branch information
aneurysmjs committed Oct 10, 2019
1 parent 2d0116e commit d9e51fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
}
}
Expand Down

0 comments on commit d9e51fe

Please sign in to comment.