Last active
March 2, 2017 22:14
-
-
Save thecneu/c81f7321a0c6d656e7e7cbebcdca9807 to your computer and use it in GitHub Desktop.
hot reload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReactDOM.render( | |
<App />, | |
rootEl | |
) | |
if (module.hot) { | |
module.hot.accept('./App', () => { | |
const NextApp = require('./App').default | |
ReactDOM.render( | |
<NextApp />, | |
rootEl | |
) | |
}) | |
} | |
const configureStore = () => { | |
const store = createStore() | |
if (module.hot) { | |
module.hot.accept(() => { | |
const nextRootReducer = require('../reducers/index').default | |
store.replaceReducer(nextRootReducer) | |
}) | |
} | |
return store | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment