Don't Rebuild. Resume.
Prior to Angular 17, "Hydration" meant destroying the server-rendered HTML and rebuilding the entire DOM from scratch. It was flickering and slow.
Modern Angular Non-Destructive Hydration reuses existing DOM nodes and attaches event listeners surgically.
Deep Dive: Progressive vs Partial
Progressive Hydration: Hydrating the page chunk-by-chunk over time (usually priority-based). All JS eventually runs.
Partial Hydration (`@defer`): Non-interactive parts (like this text block) never hydrate. Their JS code is never downloaded. The HTML stays static forever.
02. Partial Hydration (@defer)
Why load the JavaScript for a footer that is off-screen?
With @defer blocks, Angular allows you to hydrate only the critical parts of the application first, and lazy-load/hydrate the rest on interaction or visibility.
<heavy-chart-component />
{'}'} @placeholder {'{'}
<div>Loading...</div>
{'}'}
03. Event Replay
The Uncanny Valley
Between the time HTML loads and JS executes, users often click buttons. In old frameworks, these clicks were lost.
Angular's Solution
Angular captures these events using a tiny inline script and replays them once the application hydrates. Zero lost interactions.
04. The Senior Engineer's Take
Lighthouse isn't everything.
While hydration improves metrics like LCP (Largest Contentful Paint) and CLS (Cumulative Layout Shift), the real winner is INP (Interaction to Next Paint).
By keeping the main thread free from heavy DOM reconstruction, Angular ensures your app feels responsive even on low-end mobile devices.