Created
December 3, 2016 04:30
-
-
Save nelreina/69b1ec1f9c6113249f59840b1912ef45 to your computer and use it in GitHub Desktop.
create-react-app hot reload script goes in index.js
This file contains 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
if (module.hot) { | |
module.hot.accept('./App', _ => { | |
const App = require('./App').default; | |
ReactDOM.render( | |
<App />, | |
document.getElementById('root') | |
); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment