forked from lightninglu10/create-react-app-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (32 loc) · 1023 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
33
34
35
36
import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/App/App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
import { ConnectedRouter } from 'react-router-redux';
import { Provider } from 'react-redux';
import { configure, history } from './config/configure-store';
const store = configure();
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<App />
</ConnectedRouter>
</Provider>,
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./containers/App/App', () => {
const NextApp = require('./containers/App/App').default;
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<NextApp />
</ConnectedRouter>
</Provider>,
document.getElementById('root')
);
});
window.store = store;
}
registerServiceWorker();