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
Waiting for an action with takeMaybe / take after END is dispatched for SSR
function actionStateUpdate(data){
return {
type : 'STATE_UPDATE',
payload: data
}
}
function *abc(action){
const response = yield call(api);
yield put(actionStateUpdate, response);
// state is getting updated
const state = yield select();
}
function *xyz(action){
// used both take/takeMaybe
const wantsToUseActionPayload = yield takeMaybe('STATE_UPDATE');
console.log("here", wantsToUseActionPayload)
//in case of take, console is not getting printed
// in case of takeMayBe getting => { type: '@@redux-saga/CHANNEL_END' }
const state = yield select();
// unable to found updated state
}
Using Next Js and next redux wrapper
in Get server side props,
store.dispatch(END as any)
await store.sagaTask.toPromise()
The text was updated successfully, but these errors were encountered:
Waiting for an action with takeMaybe / take after END is dispatched for SSR
Using Next Js and next redux wrapper
in Get server side props,
The text was updated successfully, but these errors were encountered: