Answer the question
In order to leave comments, you need to log in
Redux-saga yield all not waiting for requests to complete?
Good afternoon
I use redux saga and I have a problem
fromServer.map(function (el) {
switch (el.type) {
case 'refresh_notice':
effects.push(call(notice, NOTICE.notice(false, true)))
break;
case 'refresh_pays':
effects.push(call(pays, PAYS.pays(false, true)))
break;
case 'refresh_trans':
effects.push(call(transRefresh, TRANS.transRefresh(
el.oid,
false,
true
)))
break;
case 'refresh_main':
effects.push(call(main, MAIN.main(false, true)))
effects.push(call(statistic, STATIC.statistic(false, true)))
break;
default:
break;
}
}
)
const results = yield all(...effects)
yield put.resolve({type: 'LOAD_END', payload: {results}})
Answer the question
In order to leave comments, you need to log in
Try like this:
yield all(effects)
yield put({type: 'LOAD_END', payload: {results} })
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question