1 | import React from 'react';
|
2 | import ReactDOM from 'react-dom';
|
3 | import { AppContainer } from 'react-hot-loader';
|
4 |
|
5 |
|
6 | class App extends React.Component {
|
7 |
|
8 | render() {
|
9 | console.log(process.env.__config__);
|
10 | return <div> {1}</div>;
|
11 | }
|
12 | }
|
13 |
|
14 | const render = (Component) => {
|
15 | ReactDOM.render(
|
16 | <AppContainer>
|
17 | <Component/>
|
18 | </AppContainer>,
|
19 | document.getElementById('root')
|
20 | );
|
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 |