2016-09-01 00:15:12 +10:00
|
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
2017-01-09 22:37:15 +11: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-25 01:56:44 +10:00
|
|
|
|
2017-01-09 22:37:15 +11:00
|
|
|
export default function configureStore() {
|
|
|
|
return createStore(appReducer, compose(applyMiddleware(thunk, loadingBarMiddleware({
|
2016-09-20 07:25:59 +10:00
|
|
|
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
|
2016-10-19 02:09:45 +11:00
|
|
|
}), errorsMiddleware()), window.devToolsExtension ? window.devToolsExtension() : f => f));
|
2016-09-20 07:25:59 +10:00
|
|
|
};
|