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

24 lines
629 B
JavaScript

import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction';
import rootReducer from '../reducers/rootReducer';
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;