setSagaRunner
setSagaRunner
is only needed when not using configureSagaStore
.
If not using configureSagaStore
, setSagaRunner
must be called after configuring the Redux Store, in order to pass the sagaMiddleware instance to Queue for Redux-Saga.
This will run any queued Sagas, and clears the queue.
#
ParameterssagaRunner
- The sagaMiddleware instance used to configure the Redux Store.
#
Usage#
Example without Redux Toolkitimport { createStore, applyMiddleware } from 'redux';import createSagaMiddleware from 'redux-saga';import { setSagaRunner } from '@vmw/queue-for-redux-saga';
const sagaMiddleware = createSagaMiddleware();
const store = createStore( rootReducer, initialState, applyMiddleware(sagaMiddleware));
setSagaRunner(sagaMiddleware);