javascript - 操作第三次运行时未触发效果

标签 javascript angular angular7 ngrx ngrx-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 - 操作第三次运行时未触发效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56753826/

相关文章:

javascript - 从 AS 3.0 执行 Javascript 文件

Angular Universal 应用不断加载问题

Angular 7 : Await function in interceptor

angular - 无法在 Angular 7 的 FormControl 中附加值

javascript - Angular 2 编译失败

angular - 'stream' 的所有声明必须具有相同的修饰符 api-ai-javascript - Dialogflow

javascript - 如何突出显示内容中的所有关键字而不是通过单击突出显示? JSP HTML Javascript

javascript - 航路点 - 向此添加类不起作用(纯 javascript)

javascript - 获取JSON的数据: clarification needed

angular - 如何使用 ngx-translate 更新当前语言?