Skip to content

Instantly share code, notes, and snippets.

@cmosguy
Created Aug 7, 2016
Embed
What would you like to do?
import { AppContainer } from 'react-hot-loader';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app';
ReactDOM.render(
<App />,
document.getElementById( 'app' )
);
/* istanbul ignore next */
if ( module.hot ) {
module.hot.accept( './components/app', () => {
require( './components/app' );
ReactDOM.render(
<App />,
document.getElementById( 'app' )
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment