gpt4 book ai didi

javascript - Action 在第三次运行时不会触发效果

转载 作者:行者123 更新时间:2023-11-29 22:55:11 24 4
gpt4 key购买 nike

Effects 在前两次调度 Action 时完美运行,但在第三次时不触发。Why action doesn't trigger Effect the second time it runs 中的解决方案和 @ngrx Effect does not run the second time对我不起作用。效果如下:

@Effect()
getRoomsByRoomsList: Observable<IAction> = this.actions$.pipe(
ofMap(commonEuropeanParliamentActions.GET_ROOMS_BY_ROOMS_LIST),
withLatestFrom(this.store, (action, state) => ({state: state, action: action})),
exhaustMap((pAction: IStateAction) =>
this.getRooms(pAction).pipe(
switchMap((entity: any) => [
commonEuropeanParliamentActions.getSuccessRoomsByRoomsList(entity),
commonEuropeanParliamentActions.getSchedule(entity)
]),
catchError(() => of()),
)
),
);

最佳答案

我也遇到了类似的问题。问题出在我的 reducer 上。在我的 reducer 中发生了一些未处理的错误,结果,效果停止工作。

如果没有其他解决方案有效,您能否检查一下您的情况是否也存在这个问题?

关于javascript - Action 在第三次运行时不会触发效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56753826/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com