Last active
October 6, 2021 07:42
-
-
Save techomoro/845c6a7bd074b6fe5f93ccd0d2d806e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// store/index.js | |
import { createStore, applyMiddleware, compose } from "redux"; | |
import createSagaMiddleware from "redux-saga"; | |
import rootReducer from "./reducers"; | |
import rootSaga from "./sagas"; | |
const sagaMiddleware = createSagaMiddleware(); | |
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | |
const store = createStore( | |
rootReducer, | |
composeEnhancers(applyMiddleware(sagaMiddleware)) | |
); | |
sagaMiddleware.run(rootSaga); | |
export default store; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment