configureStore.js 305 B

123456789101112
  1. import { createStore, applyMiddleware } from 'redux';
  2. import thunkMiddleware from 'redux-thunk';
  3. import { initialState, rootReducer } from '../reducers/root';
  4. export default function configureStore() {
  5. return createStore(
  6. rootReducer,
  7. initialState,
  8. applyMiddleware(thunkMiddleware)
  9. );
  10. }