Skip to content

Commit

Permalink
fixed reducer hot reload
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatau committed Feb 28, 2016
1 parent 74c25e9 commit b403992
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/app/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,3 @@ if (process.env.NODE_ENV === 'development') {
document.getElementById('debug-panel-root')
)
}

if (module.hot) {
module.hot.accept('./reducers', () =>
store.replaceReducer(require('./reducers'))
)
}
6 changes: 6 additions & 0 deletions src/app/services/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ export const store = makeCreateStore(middleware)(
rootReducer,
isBrowser() ? window.__INITIAL_STATE__ : {}
)

if (module.hot) {
module.hot.accept('app/reducers', () => {
store.replaceReducer(require('app/reducers'))
})
}

0 comments on commit b403992

Please sign in to comment.