I'm trying to add a redux saga function but I can't get the chaining right
const randomDelay = () => parseInt(Math.random() * 500)
const a = function*() {
yield spawn(b)
yield call(c)
}
const b = function*() {
yield delay(randomDelay())
}
const c = function*() {
yield delay(randomDelay())
}
const d = function*() {}
- I want to call
awhich will spawnband callc. - When
cis complete I wantato become unblocked and complete. - When
bandcboth complete I want to calld
From what I can tell there isn't a way to do this. all or fork will block a
To get around this for now I have c called first and a combo of b and d spawned after but that means b and c can't be running at the same time.