In redux-saga, for what reasons might you favor using call
vs. fork
and join
?
For example, when calling an HTTP API, what are the pros and cons of doing this:
const result = yield call(apiWrapperFunction, arg1, arg2)
versus this:
const task = yield fork(apiWrapperFunction, arg1, arg2)
const result = yield join(task)
this will wait for the completion of someSaga
- Does this mean, I can think of saga's as a pipeline of saga's being executed one after the other ifcall
is being used? If so, its handled within redux saga library? – Hiedihiemal