1 | import React from 'react';
|
2 | import ReactDOM from 'react-dom';
|
3 | import { AppContainer } from 'react-hot-loader';
|
4 |
|
5 | // const config = require(process.cwd() + '/cherry.config.js');
|
6 |
|
7 |
|
8 | class App extends React.Component {
|
9 |
|
10 | render() {
|
11 | return <div> ddd</div>;
|
12 | }
|
13 | }
|
14 |
|
15 | const render = (Component) => {
|
16 | ReactDOM.render(
|
17 | <AppContainer>
|
18 | <Component/>
|
19 | </AppContainer>,
|
20 | document.getElementById('root')
|
21 | );
|
22 | }
|
23 |
|
24 | render(App);
|
25 |
|
26 | // Hot Module Replacement API
|
27 | // if (module.hot) {
|
28 | // module.hot.accept('./App', () => {
|
29 | // render(App)
|
30 | // });
|
31 | // } |
\ | No newline at end of file |