-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·48 lines (40 loc) · 1.3 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/fn/array/includes';
import 'core-js/fn/array/find';
import 'core-js/fn/weak-map';
import 'raf/polyfill';
import 'url-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import createHistory from 'history/createBrowserHistory';
import { ConnectedRouter, routerMiddleware } from 'react-router-redux';
import createSagaMiddleware from 'redux-saga';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction';
import reducers from './reducers';
import rootSagas from './sagas';
import './common/less/index.less';
import App from './App';
// import registerServiceWorker from './registerServiceWorker';
const history = createHistory();
const routerReduxMiddleware = routerMiddleware(history);
const sagaMiddleware = createSagaMiddleware();
const store = createStore(
reducers,
composeWithDevTools(
applyMiddleware(routerReduxMiddleware),
applyMiddleware(sagaMiddleware)
)
);
sagaMiddleware.run(rootSagas);
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<App />
</ConnectedRouter>
</Provider>,
document.getElementById('root')
);
// registerServiceWorker();