index.ts 452 B

1234567891011121314
  1. import { createStore, applyMiddleware } from 'redux';
  2. import thunk from 'redux-thunk';
  3. import { persistStore } from 'redux-persist';
  4. import { composeWithDevTools } from 'redux-devtools-extension';
  5. import { rootReducer } from '../rootReducer';
  6. const composeEnhancers = composeWithDevTools({});
  7. const store = createStore(
  8. rootReducer,
  9. composeEnhancers(applyMiddleware(thunk)),
  10. );
  11. const persistor = persistStore(store);
  12. export { store, persistor };