
Intermediate workshop
Nx for Scalable Architecture
Master Nx to enforce architecture, speed up your development workflow and improve code quality
Learn more
In Part 1 and Part 2, we explored what incremental hydration is, why it matters for performance, and how it affects core web vitals like LCP, INP, and CLS. Now, we'll look at how to implement incremental hydration in a real-world Angular application. We’ll cover the basic setup, hydration triggers, and important considerations to ensure a seamless integration.
Before exploring incremental hydration patterns, we’ll need to set up server-side rendering (SSR). If your application is not already SSR-enabled, refer to Angular’s official SSR documentation for up-to-date instructions. Setting up SSR creates the foundation for incremental hydration, allowing your app to render on the server and transition smoothly to the client.
Once SSR is configured, the next step is to enable incremental hydration in your app.config.tswithIncrementalHydration()
// app.config.ts
import { ApplicationConfig } from '@angular/core';
import {
provideClientHydration,
withIncrementalHydration,
} from '@angular/platform-browser';
export const appConfig: ApplicationConfig = {
providers: [
provideClientHydration(
// withEventReplay(), -> automatically included
withIncrementalHydration()
),
]
};
This minimalistic setup makes it incredibly easy for developers to enable incremental hydration without dealing with complex configurations.
The @defer template syntax is key to incremental hydration in Angular. It allows developers to keep apps responsive by deferring the rendering of specific components until they’re actually needed. Starting with Angular 19, hydration triggers make this feature even more powerful, letting you control exactly when and how a component hydrates based on user interactions or other events.
// overview-page.component.ts
@defer(hydrate on interaction) {
This approach helps you load JavaScript strategically: not too soon, not too late, but precisely when needed. It’s especially useful for postponing the loading of complex third-party libraries, image-heavy sections, or less frequently visited parts of your app.
Hydration triggers determine when a component should hydrate. You can use them individually or combine them with regular @defer
interaction
timer()
idle
@defer(hydrate on interaction; preload on idle) {
If you decide not to hydrate a component at all, you can specify:
@defer(hydrate never) {

As you adopt incremental hydration, consider the following implementation patterns to optimize performance and user experience:
Small Components. Items like dynamic lists or media elements that don’t require immediate interactivity can be deferred, which reduces the initial JavaScript load and keeps the main thread free.
Big Components. Heavier features are best hydrated only when the user navigates to them or interacts with a specific toggle.
Network Constraints. On slower networks, large, lazy-loaded chunks can hamper initial rendering. Incremental hydration helps you load minimal HTML first, deferring heavier downloads until necessary.
UI Complexity. More complex UI segments can remain unhydrated until they are actively engaged with, preventing the user from waiting through large initialization overheads.
💡 Tip
Don’t guess – measure! Tools like WebPageTest, Chrome DevTools, and Lighthouse can help identify which components would benefit most from deferral.
When it comes to implementing incremental hydration and deferred loading in a real-world application, it is important to consider a couple of factors:
How much is the buy-in? Does the complexity allow a setup without bigger refactoring?
Content-Lifetime. Depending on the data rendered, we might have to consider more fitting techniques like pre-rendering, SSG, or ISR.
Smaller devices, in general, have smaller viewports and slower hardware. Be sure to use loading indicators while hydration is ongoing.
Implementing incremental hydration in Angular transforms how your application loads and responds to users. By strategically deferring the hydration of non-critical components, you can achieve faster perceived load times, reduced main thread blocking, and more stable layouts.
Following the steps and patterns discussed in this article will help you integrate incremental hydration smoothly into your Angular projects. This approach not only optimizes performance but also improves the overall user experience, making your applications faster, more responsive, and visually stable.

Intermediate workshop
Master Nx to enforce architecture, speed up your development workflow and improve code quality
Learn more
Accessibility doesn’t have to be hard. Follow a comic-style, hands-on journey building an accessible day selector with Angular Aria, learning comboboxes, listboxes, and real screen reader behavior along the way.

Let's dive deeper into why incremental hydration in Angular matters so much for performance and user experience, focusing on its influence on Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS).

Incremental hydration is a groundbreaking new feature in Angular that heavily impacts critical performance metrics like INP and LCP, while also reducing the effort required to maintain CLS at low levels.

PushBased's 2024 recap: 43 talks, NgGlühwein conference, RxAngular updates, and more. A year of growth, innovation, and community! Read our journey. 🚀

Angular is bridging the gap between the new Signal-Forms architecture and the Template/Reactive Forms. This isn't just a minor update—it’s a fundamental shift in how we author custom form controls.

Profiling is easiest when it's real. Learn how to capture and make sense of CPU profiles in Node.js across scripts, threads, and processes—then apply it to your own projects.