Skip to content

Instantly share code, notes, and snippets.

@nelreina
Created December 3, 2016 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelreina/69b1ec1f9c6113249f59840b1912ef45 to your computer and use it in GitHub Desktop.
Save nelreina/69b1ec1f9c6113249f59840b1912ef45 to your computer and use it in GitHub Desktop.
create-react-app hot reload script goes in index.js
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