A Look Behind the Scenes of React & Optimization TechniquesEntry 10 of 10
Summary
| Optimization | React | Angular |
|---|---|---|
| Find slow components | DevTools Profiler | Angular DevTools Profiler |
| Skip re-render on same props | memo() | OnPush (and signals) |
| Reduce re-render scope | Move state down | Keep state local |
| Cache a computed value | useMemo() | computed() / pure pipe |
| Stable function identity | useCallback() | Class methods |
| List identity | key | track in @for |
| Reset component state | Change its key | linkedSignal() / one-item @for |
| DOM updates | Virtual DOM diffing | Compiled binding updates |
| Automatic memoization | React Compiler | Built into signals |
React re-runs components and gives you tools (memo, useMemo, useCallback, keys, and now the compiler) to limit that work. Angular avoids most of the work in the first place: signals update only the bindings that depend on them.