Angular List Performance (TrackBy)
Optimizes Angular list rendering by implementing stable identity tracking to prevent unnecessary DOM recreation.
This skill enhances Angular application performance by ensuring that lists rendered with *ngFor or the modern @for control flow use stable identifiers. By providing a reliable identity for each item, it prevents Angular from unnecessarily destroying and recreating DOM elements during array refreshes, sorts, or filters. This approach improves rendering speed and preserves critical UI states—such as input focus, animations, and expanded rows—that are frequently lost when lists are re-rendered without proper identity tracking.
主な機能
01Selects the most appropriate domain identifiers for render stability
02Configures stable track expressions for modern @for control flow
032 GitHub stars
04Identifies Angular lists missing stable identity tracking
05Prevents focus loss and UI flicker during list updates
06Implements trackBy functions for legacy *ngFor templates
ユースケース
01Fixing UI state issues when filtering, sorting, or paginating data
02Reducing DOM churn in applications with high-frequency state updates
03Optimizing large data tables or lists fetched from external APIs