summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/redux/configureStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'front/odiparpack/app/redux/configureStore.js')
-rw-r--r--front/odiparpack/app/redux/configureStore.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/front/odiparpack/app/redux/configureStore.js b/front/odiparpack/app/redux/configureStore.js
index 49a6b7b..80c84c0 100644
--- a/front/odiparpack/app/redux/configureStore.js
+++ b/front/odiparpack/app/redux/configureStore.js
@@ -7,6 +7,7 @@ import { fromJS } from 'immutable';
import { routerMiddleware } from 'connected-react-router/immutable';
import createSagaMiddleware from 'redux-saga';
import createReducer from './reducers';
+import thunk from 'redux-thunk';
const sagaMiddleware = createSagaMiddleware();
@@ -14,7 +15,7 @@ export default function configureStore(initialState = {}, history) {
// Create the store with two middlewares
// 1. sagaMiddleware: Makes redux-sagas work
// 2. routerMiddleware: Syncs the location/URL path to the state
- const middlewares = [sagaMiddleware, routerMiddleware(history)];
+ const middlewares = [thunk,sagaMiddleware, routerMiddleware(history)];
const enhancers = [applyMiddleware(...middlewares)];
@@ -29,11 +30,12 @@ export default function configureStore(initialState = {}, history) {
shouldHotReload: false,
})
: compose;
+
/* eslint-enable */
const store = createStore(
createReducer(),
fromJS(initialState),
- composeEnhancers(...enhancers),
+ composeEnhancers(...enhancers)
);
// Extensions