From 23c1da24ec625a439219c9ff7ec37d40b66aa003 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:15:50 -0400 Subject: [PATCH] Prerendering behavior updates (#32881) --- aspnetcore/blazor/components/render-modes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aspnetcore/blazor/components/render-modes.md b/aspnetcore/blazor/components/render-modes.md index 2a80c7d552..8ff3cb5a35 100644 --- a/aspnetcore/blazor/components/render-modes.md +++ b/aspnetcore/blazor/components/render-modes.md @@ -302,6 +302,14 @@ When using a Blazor Web App, most of the Blazor documentation example components Prerendering is enabled by default for interactive components. +Internal navigation for interactive routing doesn't involve requesting new page content from the server. Therefore, prerendering doesn't occur for internal page requests, including for [enhanced navigation](xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling). For more information, see [Static versus interactive routing](xref:blazor/fundamentals/routing#static-versus-interactive-routing), [Interactive routing and prerendering](xref:blazor/components/prerender#interactive-routing-and-prerendering), and [Enhanced navigation and form handling](xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling). + + + +Disabling prerendering using the following techniques only takes effect for top-level render modes. If a parent component specifies a render mode, the prerendering settings of its children are ignored. This behavior is under investigation for possible changes with the release of .NET 10 in November, 2025. + To disable prerendering for a *component instance*, pass the `prerender` flag with a value of `false` to the render mode: * `<... @rendermode="new InteractiveServerRenderMode(prerender: false)" />`