Answer the question
In order to leave comments, you need to log in
What is the correct way to call a saga from another saga?
there is a query call saga
\\pseudocode
getDataWorker* (action) {
try {
data = yield getData()
yield put(getDataSuccess(data))
} catch(error) {
yield put(getDataError(error))
}
}
watcher* () {
yield takeEvery(getDataRequest, getDataWorker)
}
AnotherWorker* (action) {
yield put(getDataRequest())
yield take(getDataSuccess)
data = yield select(data)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question