-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
41 lines (34 loc) · 1.12 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
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import 'semantic-ui-css/semantic.min.css';
import registerServiceWorker from './registerServiceWorker';
import {createStore,applyMiddleware, compose} from 'redux';
import { Provider } from 'react-redux';
import custreducers from './_reducers/reducers'
import thunk from 'redux-thunk';
import { BrowserRouter as Router } from "react-router-dom";
const composeEnhancers =
typeof window === 'object' &&
(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
: compose);
function configureStore() {
const middlewares = [];
const store = createStore(
custreducers,composeEnhancers(applyMiddleware(...middlewares,thunk)),
// {},
// composeEnhancers(applyMiddleware(...middlewares))
);
return store;
}
const store = configureStore();
// const store = createStore(custreducers,applyMiddleware(thunk));
ReactDOM.render(
<Provider store={store}>
<Router>
<App/>
</Router>
</Provider>, document.getElementById('root'));
registerServiceWorker();