You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
432 B
23 lines
432 B
7 years ago
|
import React from 'react';
|
||
|
import ReactDOM from 'react-dom';
|
||
|
import 'react-hot-loader/patch';
|
||
|
import { AppContainer } from 'react-hot-loader';
|
||
|
|
||
|
import App from './app';
|
||
|
|
||
|
|
||
|
const render = Component => {
|
||
|
ReactDOM.render(
|
||
|
<AppContainer>
|
||
|
<Component />
|
||
|
</AppContainer>,
|
||
|
document.getElementById('root')
|
||
|
)
|
||
|
}
|
||
|
|
||
|
render(App)
|
||
|
|
||
|
if (module.hot) {
|
||
|
module.hot.accept('./app', () => { render(App) })
|
||
|
}
|