runSaga
Runs a saga, or adds it to the queued sagas to be run, once the Redux Store has been configured with a sagaMiddleware instance.
- Before
setSagaRunner
is called,runSaga
will queue the Saga. - When
setSagaRunner
is called all queued Sagas will be run. - After
setSagaRunner
is called,runSaga
delegates to the runner. The runner is an object with a run function, which is usually the run function of the sagaMiddleware instance used to configure the Redux Store.
#
Parameterssaga
#
The Saga generator function to be run.
...args
#
Optional - Arguments to be passed to the Saga.
#
Usage#
Basic Exampleimport { runSaga } from '@vmw/queue-for-redux-saga';
runSaga(function* loadSomethingWatch() { yield takeEvery(LOAD_SOMETHING, loadSomethingWorker);});
...