
Intermediate workshop
Nx for Scalable Architecture November
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()
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.
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
If you decide not to hydrate a component at all, you can specify:

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
If Signals were Angular’s “aha!” moment, Zoneless is the “oh wow—this feels snappy” moment. With Angular v21, new apps use zoneless change detection by default. No more zone.js magic under the hood—just explicit, predictable reactivity powered by Signals.

Part 2 is a practical walkthrough to diagnose and speed up LCP. Learn to read CrUX trends, profile in Chrome DevTools, preload critical assets, use srcset, defer third-party scripts, and code-split Angular bundles to turn red LCP into green.

Deploy one Angular app for many clients with unique configs—without breaking SSR or DX. Here’s how to unlock dynamic configuration.

Largest Contentful Paint (LCP) is a Core Web Vital that shapes user perception of speed. This first part explains what LCP is why it matters for SEO and business, and how its phases affect site performance.

CPU profiles are more than flame charts—they’re structured JSON files. Learn how nodes, samples, and time deltas form the backbone of DevTools performance data.

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.