-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
39 lines (31 loc) · 999 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
37
38
39
import './bootstrap'
import React from 'react';
import ReactDOM from 'react-dom';
import createHistory from 'history/createBrowserHistory';
import createSagaMiddleware from 'redux-saga';
import { Provider } from 'react-redux';
import { routerMiddleware } from 'react-router-redux';
import { applyMiddleware, createStore } from 'redux';
//import registerServiceWorker from './registerServiceWorker';
import App from './components/App';
import Saga from './saga';
import reducer from './reducer';
import "bootstrap/dist/css/bootstrap.css";
// create middlewares
const history = createHistory();
const sagaMiddleware = createSagaMiddleware();
const middleware = applyMiddleware(
routerMiddleware(history),
sagaMiddleware
);
// create store
const store = createStore(reducer, middleware);
// run saga middleware
sagaMiddleware.run(Saga);
ReactDOM.render(
<Provider store={store}>
<App history={history} />
</Provider>,
document.getElementById('root')
);
//registerServiceWorker();