What is hydration in Angular?

Angular performance and SSR · Freshers and experienced

Model answer

Hydration is the step where the browser reuses the HTML that the server rendered and attaches Angular to it, instead of throwing it away and rendering again. It avoids flicker and repeated work and improves load metrics.

It works only if the server and browser produce the same DOM. Problems usually come from direct DOM changes or invalid HTML. Event replay can capture user clicks that happen before hydration finishes.

Learn this topic

Angular Tutorial: Beginner to Advanced .

Sign in to add your own answer.

More questions