logoutEffect$ = createEffect(() => {
return this.actions$.pipe(
ofType(AuthActions.logout),
mergeMap(() =>
this.authService.signOut().pipe(
map(() => AuthActions.logoutSuccess()),
catchError(error => of(AuthActions.logoutFailure({ error }))))
),
);
});
这是我的注销效果。当我单击注销调度时,什么也没有发生。有谁能帮我一下吗?
您可以尝试switchMap
而不是mergeMap
吗?