You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make another saga that fetches some data to not getting executed. But for some kind of reason it still happends and i can not figure out how to make this work.
After the generator is executing I wanna cancel another generator from running, but maybe I read the docs wrong and can not be achieved
Code for generator B that should cancel the generator A:
const task = yield fork(handleGetConversations, {
payload: {callback: {}},
type: EChatTypes.GET_CONVERSATIONS_SAGA,
});
yield take(EChatTypes.GET_CONVERSATIONS_SAGA);
yield cancel(task);
yield cancelled();
Hope someone can help me figure out how to solve it.
This discussion was converted from issue #2211 on August 10, 2021 09:54.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Code for generator B that should cancel the generator A:
const task = yield fork(handleGetConversations, {
payload: {callback: {}},
type: EChatTypes.GET_CONVERSATIONS_SAGA,
});
yield take(EChatTypes.GET_CONVERSATIONS_SAGA);
yield cancel(task);
yield cancelled();
Hope someone can help me figure out how to solve it.
Beta Was this translation helpful? Give feedback.
All reactions