Skip to content

Instantly share code, notes, and snippets.

@Nilanth

Nilanth/.jsx Secret

Last active July 21, 2021 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nilanth/eb8a67a9e07c6bb199b9f435a1eb5aec to your computer and use it in GitHub Desktop.
Save Nilanth/eb8a67a9e07c6bb199b9f435a1eb5aec to your computer and use it in GitHub Desktop.
redux-saga
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