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
setSagaRunneris called,runSagawill queue the Saga. - When
setSagaRunneris called all queued Sagas will be run. - After
setSagaRunneris called,runSagadelegates 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.
Parameters#
saga#
The Saga generator function to be run.
...args#
Optional - Arguments to be passed to the Saga.
Usage#
Basic Example#
import { runSaga } from '@vmw/queue-for-redux-saga';
runSaga(function* loadSomethingWatch() { yield takeEvery(LOAD_SOMETHING, loadSomethingWorker);});
...