Skip to content

Instantly share code, notes, and snippets.

@abiodun0
Created March 27, 2018 10:41
Show Gist options
  • Save abiodun0/bff1adac96305b512dbc144042ceb66a to your computer and use it in GitHub Desktop.
Save abiodun0/bff1adac96305b512dbc144042ceb66a to your computer and use it in GitHub Desktop.
Some simple hot reloading
if (module.hot) {
module.hot.accept('./components/root/RootComponent.js', () => {
const FdyRootComponent = require('./components/root/RootComponent.js').FdyRootComponent
ReactDOM.unmountComponentAtNode(node)
ReactDOM.render(
<Provider store={store}>
<RouterProvider router={router.routerInstance}>
<FdyRootComponent />
</RouterProvider>
</Provider>,
node)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment