例如
{
...,
effects:{
*auth(),
*login(){
yield response = call(auth,action,{put})
....
}
}
}
如果要调用effect里面的方法,得怎么写
两个方案:
action 去调? yield put({ type: 'auth' });,缺点是不会等待完成auth 抽到 model 外,然后在 effect 里用 yiled * 去调他我现在就是使用你第二种方法,谢谢你这么及时回复
@sorrycc 请问如何在effect里同步等待另一个effect的完成?
还可以yield take('auth/@@end')
还可以yield take('auth/@@EnD')
可行,好办法
Most helpful comment
@sorrycc 请问如何在effect里同步等待另一个effect的完成?