This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-08-31 16:15:12 +02:00
|
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
2016-09-19 23:25:59 +02:00
|
|
|
import thunk from 'redux-thunk';
|
|
|
|
import appReducer from '../reducers';
|
|
|
|
import { loadingBarMiddleware } from 'react-redux-loading-bar';
|
2016-08-24 17:56:44 +02:00
|
|
|
|
2016-08-31 16:15:12 +02:00
|
|
|
export default function configureStore(initialState) {
|
2016-09-19 23:25:59 +02:00
|
|
|
return createStore(appReducer, initialState, compose(applyMiddleware(thunk, loadingBarMiddleware({
|
|
|
|
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
|
|
|
|
})), window.devToolsExtension ? window.devToolsExtension() : f => f));
|
|
|
|
};
|