-
-
Save Nilanth/eb8a67a9e07c6bb199b9f435a1eb5aec to your computer and use it in GitHub Desktop.
redux-saga
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
import { configureStore } from '@reduxjs/toolkit' | |
import createSagaMiddleware from 'redux-saga'; | |
import counterReducer from './counterSlice' | |
import rootSaga from './sagas'; | |
const sagaMiddleware = createSagaMiddleware(); | |
export default configureStore({ | |
reducer: counterReducer, | |
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(sagaMiddleware), | |
}); | |
sagaMiddleware.run(rootSaga); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment