24 lines
510 B
JavaScript
24 lines
510 B
JavaScript
import { createStore, applyMiddleware, compose } from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
import history from '../history';
|
|
import { routerMiddleware } from 'connected-react-router'
|
|
import rootReducer from '../reducers';
|
|
import getInitialState from '../utils/get-initial-state';
|
|
|
|
const initialState = getInitialState();
|
|
|
|
const store = createStore(
|
|
rootReducer(history),
|
|
initialState,
|
|
compose(
|
|
applyMiddleware(
|
|
routerMiddleware(history),
|
|
thunk
|
|
)
|
|
)
|
|
);
|
|
|
|
export default store;
|
|
|
|
|
|
|