Performance: NgRx store concept
MEDIUM IMPACT
NgRx store affects how state changes impact rendering and user interaction responsiveness in Angular apps.
this.store.select(selectFeatureSlice).subscribe(data => { this.featureData = data; });
this.store.select(state => state).subscribe(data => { this.fullState = data; this.cd.detectChanges(); });
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Selecting entire state | Many components update | Many reflows | High paint cost | [X] Bad |
| Selecting feature slice only | Minimal DOM updates | Few reflows | Low paint cost | [OK] Good |