Sign in to track progress and bookmarks.
In a massive enterprise app, the user might only use 10% of the features. Lazy Loading ensures they only download the code they actually need.
You can configure specific assemblies (DLLs) to be lazy-loaded. For example, if you have a massive 'Reporting' module with heavy dependencies like Syncfusion or DevExpress, you can defer downloading that DLL until the user actually navigates to the /reports page.
In your App.razor, you listen to the OnNavigateAsync event. When a user requests a lazy-loaded route, you use the LazyAssemblyLoader service to fetch the DLL from the server. Once the download is complete, Blazor automatically registers the new types, and the navigation finishes seamlessly.
Q: "Does lazy loading help with Blazor Server?"
Architect Answer: "NO. Blazor Server only sends UI diffs; the code is already on the server. This is a **WASM-only** optimization. For Blazor WASM, it is the single most effective way to keep your 'Initial Load' time under control as your application grows to hundreds of pages."
Quizzes linked to this course—pass to earn certificates.
On this page
1. Splitting the App 2. The Navigation Hook 3. Architect Insight