2016-08-31 07:15:12 -07:00
|
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
2017-01-09 03:37:15 -08:00
|
|
|
import thunk from 'redux-thunk';
|
|
|
|
import appReducer from '../reducers';
|
|
|
|
import { loadingBarMiddleware } from 'react-redux-loading-bar';
|
|
|
|
import errorsMiddleware from '../middleware/errors';
|
|
|
|
import Immutable from 'immutable';
|
2016-08-24 08:56:44 -07:00
|
|
|
|
2017-01-09 03:37:15 -08:00
|
|
|
export default function configureStore() {
|
|
|
|
return createStore(appReducer, compose(applyMiddleware(thunk, loadingBarMiddleware({
|
2016-09-19 14:25:59 -07:00
|
|
|
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
|
2016-10-18 08:09:45 -07:00
|
|
|
}), errorsMiddleware()), window.devToolsExtension ? window.devToolsExtension() : f => f));
|
2016-09-19 14:25:59 -07:00
|
|
|
};
|