store.js 602B

12345678910111213141516171819
  1. import { createStore, applyMiddleware, compose } from 'redux'
  2. import thunkMiddleware from 'redux-thunk'
  3. // import { createLogger } from 'redux-logger'
  4. import rootReducer from './reducer/root.js'
  5. // import createSagaMiddleware from 'redux-saga'
  6. // import rootSaga from './saga.js'
  7. // const sagaMiddleware = createSagaMiddleware()
  8. export const store = createStore(
  9. rootReducer,
  10. compose(
  11. applyMiddleware(thunkMiddleware /* , sagaMiddleware, createLogger() */),
  12. (window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()) || (f => f)
  13. )
  14. )
  15. // sagaMiddleware.run(rootSaga)