DocSpace-client/web/ASC.Web.Client/src/store/store.js

24 lines
619 B
JavaScript
Raw Normal View History

2019-05-30 07:33:38 +00:00
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction';
import rootReducer from './rootReducer';
2019-05-30 07:33:38 +00:00
import thunk from 'redux-thunk';
/* eslint-disable no-underscore-dangle */
const composeEnhancers = composeWithDevTools({
// options like actionSanitizer, stateSanitizer
});
const configureStore = prelodedState => (
createStore(
rootReducer,
prelodedState,
composeEnhancers(
applyMiddleware(thunk)
)
)
);
/* eslint-enable */
const store = configureStore({});
export default store;