@ngrx/effects
Advanced tools
Changelog
8.5.0 (2019-11-07)
<a name="8.4.0"></a>
Changelog
8.4.0 (2019-10-09)
<a name="8.3.0"></a>
Changelog
8.3.0 (2019-08-29)
<a name="8.2.0"></a>
Changelog
8.2.0 (2019-07-31)
<a name="8.1.0"></a>
Changelog
8.1.0 (2019-07-09)
<a name="8.0.1"></a>
Changelog
8.0.0-rc.0 (2019-05-30)
BEFORE:
login$ = createEffect(() =>
this.actions$.pipe(
ofType(LoginPageActions.login),
mapToAction(
// Happy path callback
(action) => this.authService.login(action.credentials).pipe(map((user) => AuthApiActions.loginSuccess({ user }))),
// error callback
(error) => AuthApiActions.loginFailure({ error })
)
)
);
AFTER:
login$ = createEffect(
() =>
this.actions$.pipe(
ofType(LoginPageActions.login),
mapToAction(
// Happy path callback
(action) => this.authService.login(action.credentials).pipe(map((user) => AuthApiActions.loginSuccess({ user }))),
// error callback
(error) => AuthApiActions.loginFailure({ error })
)
// Errors are handled and it is safe to disable resubscription
),
{ resubscribeOnError: false }
);
<a name="8.0.0-beta.2"></a>