Angular CLI schematics for generating NgRx state management code including actions, reducers, effects, selectors, and feature modules.
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
Automated migration schematic to replace the async pipe with ngrxPush pipe for better performance and change detection optimization in NgRx applications.
The NgRx Push Migration schematic automatically transforms templates in your Angular application to replace the standard async pipe with the more efficient ngrxPush pipe from @ngrx/component. This migration improves performance by providing better change detection control and reducing unnecessary re-renders.
Scans your application for usage of the async pipe with NgRx observables and replaces them with ngrxPush.
interface NgRxPushMigrationSchema {
// This migration schematic has no configurable properties
// It automatically scans and transforms the entire project
}CLI Usage:
# Run the migration across your entire project
ng generate @ngrx/schematics:ngrx-push-migration
# Alternative using alias
ng generate @ngrx/schematics:ngrxpush<!-- Component template using async pipe -->
<div>{{ user$ | async }}</div>
<div *ngIf="isLoading$ | async">Loading...</div>
<ul>
<li *ngFor="let item of items$ | async">{{ item.name }}</li>
</ul><!-- Component template using ngrxPush pipe -->
<div>{{ user$ | ngrxPush }}</div>
<div *ngIf="isLoading$ | ngrxPush">Loading...</div>
<ul>
<li *ngFor="let item of items$ | ngrxPush">{{ item.name }}</li>
</ul>ngrxPush provides more granular change detection control@ngrx/component must be installed in your projectasync pipe with observable streamsThis migration:
async pipe with observablesasync with ngrxPush where appropriate