@ngrx/schematics
Advanced tools
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>
Changelog
8.0.0-beta.2 (2019-05-15)
<a name="8.0.0-beta.1"></a>
Changelog
8.0.0-beta.0 (2019-04-17)
BEFORE:
@NgModule({
imports: [StoreRouterConnectingModule],
})
export class AppModule {}
AFTER:
@NgModule({
imports: [StoreRouterConnectingModule.forRoot()],
})
export class AppModule {}
BEFORE:
const getTodosById = createSelector((state: TodoAppSchema, id: number) => state.todos.find((p) => p.id === id));
AFTER:
const getTodosById = createSelector(
(state: TodoAppSchema) => state.todos,
(todos: Todo[], id: number) => todos.find((p) => p.id === id)
);
actionsWhitelist
is renamed to actionsSafelist
actionsBlacklist
is renamed to actionsBlocklist
BEFORE:
StoreDevtoolsModule.instrument({
actionsWhitelist: ['...'],
actionsBlacklist: ['...'],
});
AFTER:
StoreDevtoolsModule.instrument({
actionsSafelist: ['...'],
actionsBlocklist: ['...'],
});
<a name="7.4.0"></a>
Changelog
7.2.0 (2019-01-29)
<a name="7.1.0"></a>
Changelog
7.1.0 (2019-01-21)
<a name="7.0.0"></a>
Changelog
7.0.0 (2018-12-20)
<a name="7.0.0-beta.1"></a>