等待 运行 Saga 中间件
waiting for run Saga middleware
我的 redux-saga 实际上有问题 configureStore.js 我有 :
sagaMiddleware.run(mysaga);
我希望代码仅在我的 saga returns 某些东西
时执行
如果你说的不多我也听懂了,你要的解决办法其实是:
reduxSagaMiddleware return a task:
Middleware.run (saga, ... args)
Dynamically run saga. Can be used to run Sagas only after the applyMiddleware phase.
... the method returns a Task descriptor.
来自 redux-saga
所以你会有一个task.done,return一个承诺,你可以这样做:
task.done.then(() => {
// this code will be executed only when the saga is finished
});
我的 redux-saga 实际上有问题 configureStore.js 我有 :
sagaMiddleware.run(mysaga);
我希望代码仅在我的 saga returns 某些东西
时执行如果你说的不多我也听懂了,你要的解决办法其实是:
reduxSagaMiddleware return a task:
Middleware.run (saga, ... args)
Dynamically run saga. Can be used to run Sagas only after the applyMiddleware phase.
... the method returns a Task descriptor.
来自 redux-saga
所以你会有一个task.done,return一个承诺,你可以这样做:
task.done.then(() => {
// this code will be executed only when the saga is finished
});