forked from qzhongyou/react-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (30 loc) · 743 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import configureStore from './store/configureStore';
import Root from './containers/Root';
import { BrowserRouter as Router} from "react-router-dom";
const store = configureStore();
render(
<AppContainer>
<Router>
<Root
store={ store }
/>
</Router>
</AppContainer>,
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./containers/Root', () => {
const RootContainer = require('./containers/Root').default;
render(
<AppContainer>
<RootContainer
store={ store }
/>
</AppContainer>,
document.getElementById('root')
);
});
}