@ngrx/schematics
Advanced tools
Changelog
9.2.0 (2020-05-28)
<a name="9.1.2"></a>
Changelog
9.1.0 (2020-04-07)
<a name="9.0.0"></a>
Changelog
9.0.0-beta.1 (2020-02-18)
<a name="9.0.0-beta.0"></a>
Changelog
9.0.0-beta.0 (2020-02-06)
BEFORE:
If no router state serializer is provided through the configuration of router store, the DefaultRouterStateSerializer is used.
AFTER:
If no router state serializer is provided through the configuration of router store, the MinimalRouterStateSerializer is used.
resubscribeOnError
renamed to useEffectsErrorHandler
in createEffect
metadataBEFORE:
class MyEffects {
effect$ = createEffect(() => stream$, {
resubscribeOnError: true, // default
});
}
AFTER:
class MyEffects {
effect$ = createEffect(() => stream$, {
useEffectsErrorHandler: true, // default
});
}
When the effect class was registered, the init action would be dispatched. If the effect was provided in multiple lazy loaded modules, the init action would be dispatched for every module.
AFTER:
The init action is only dispatched once The init action is now dispatched based on the identifier of the effect (via ngrxOnIdentifyEffects)
--spec
to --skipTest
.
By default skipTest is false, this way you will always be provided with *.spec.ts files
BEFORE:
ng generate action User --spec
AFTER:
ng generate action User
Using mockSelector.setResult(undefined)
resulted in clearing the
return value.
AFTER:
Using mockSelector.setResult(undefined)
will set the return value of
the selector to undefined
.
To reset the mock selector, use mockSelector.clearResult()
.
styleExt
option has been changed to style
.BEFORE:
"@schematics/angular:component": {
"inlineStyle": true,
"prefix": "aio",
"styleext": "scss"
}
...
AFTER:
"@schematics/angular:component": {
"inlineStyle": true,
"prefix": "aio",
"style": "scss"
}
....
BEFORE:
Immutability checks are opt-in.
AFTER:
If state or action is mutated then there will be a run time exception thrown.
@ngrx/store
will be generated.BEFORE:
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
StoreModule.forRoot(reducers, {
metaReducers,
runtimeChecks: {
strictStateImmutability: true,
strictActionImmutability: true
}
}),
.....
],
providers: [],
bootstrap: [AppComponent]
})
AFTER:
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
StoreModule.forRoot({})
....
],
providers: [],
bootstrap: [AppComponent]
})
The create functions weren't the default to create actions, reducers and effects
AFTER:
The create functions are the default to create actions (createAction, reducers (createReducer) and effects (createEffect) To fallback to the previous generators, use
sh ng generate reducer ReducerName --creators=false
<a name="8.6.0"></a>