【发布时间】:2018-02-26 01:50:09
【问题描述】:
有没有一种模式可以制作redux-observable 史诗缓冲区,直到存储中的值为真?
const uploadsCompleteEpic = (action$, store) => {
return action$
.ofType(actionTypes.UPLOAD_SUCCESS)
.bufferWhen(store => store.getState().remaining -1 === 0)
.do(action => console.log(action))
.ignoreElements();
};
上述方法不起作用,因为bufferWhen 中的函数不是 Observable。我也尝试将缓冲区函数包装在Observable.single 中,但没有成功。
【问题讨论】:
标签: rxjs redux-observable