redux - Run an array of sagas effect sequentially -
i trying yield array of saga effects sequentially. idea yield all([call(foo), call(bar])
run call(foo)
, call(bar)
in parallel (or @ least in pseudo-parallel fashion).
however, want sagas run sequentially, meaning want wait foo
end before lauching bar
(this way can cancel process).
this array of call generated dynamically, can hard write series of yield
. correct syntax in case ?
the redux-saga documentation has example of sequencing sagas.
if have array of calls, yield these in saga. example:
// array containing call objects let calls = [...]; // call each in order present in array (let c of calls) { yield c }
Comments
Post a Comment