12345678910111213141516 |
- import { createStore, applyMiddleware, compose } from 'redux';
- import thunk from 'redux-thunk';
- import rootReducer from '../../reducers';
- export default () => {
- const middlewares = [thunk];
- const composeEnhancers =
- (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
- const enhancer = composeEnhancers(applyMiddleware(...middlewares));
- const store = createStore(rootReducer, undefined, enhancer);
- return store;
- };
|