Skip to content

Commit 4012867

Browse files
committed
Updates
1 parent b89bb1c commit 4012867

File tree

17 files changed

+400
-375
lines changed

17 files changed

+400
-375
lines changed

aspnetcore/blazor/call-web-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ When prerendering, components render twice: first statically, then interactively
631631
632632
You can address this by flowing prerendered state using the Persistent Component State API, which the `BlazorWebAppCallWebApi` and `BlazorWebAppCallWebApi_Weather` [sample apps](#sample-apps) demonstrate. When the component renders interactively, it can render the same way using the same state. However, the API doesn't currently work with enhanced navigation, which you can work around by disabling enhanced navigation on links to the page (`data-enhanced-nav=false`). For more information, see the following resources:
633633
634-
* <xref:blazor/components/prerender#persist-prerendered-state>
634+
* <xref:blazor/state-management/persistent-component-state>
635635
* <xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling>
636636
* [Support persistent component state across enhanced page navigations (`dotnet/aspnetcore` #51584)](https://github.com/dotnet/aspnetcore/issues/51584)
637637

aspnetcore/blazor/components/cascading-values-and-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ Cascading parameters don't pass data across render mode boundaries:
517517

518518
* State crossing the boundary between static and interactive rendering must be serializable. Components are arbitrary objects that reference a vast chain of other objects, including the renderer, the DI container, and every DI service instance. You must explicitly cause state to be serialized from static SSR to make it available in subsequent interactively-rendered components. Two approaches are adopted:
519519
* Via the Blazor framework, parameters passed across a static SSR to interactive rendering boundary are serialized automatically if they're JSON-serializable, or an error is thrown.
520-
* State stored in [`PersistentComponentState`](xref:blazor/components/prerender#persist-prerendered-state) is serialized and recovered automatically if it's JSON-serializable, or an error is thrown.
520+
* State stored in [`PersistentComponentState`](xref:blazor/state-management/persistent-component-state) is serialized and recovered automatically if it's JSON-serializable, or an error is thrown.
521521

522522
Cascading parameters aren't JSON-serializable because the typical usage patterns for cascading parameters are somewhat like DI services. There are often platform-specific variants of cascading parameters, so it would be unhelpful to developers if the framework stopped developers from having server-interactive-specific versions or WebAssembly-specific versions. Also, many cascading parameter values in general aren't serializable, so it would be impractical to update existing apps if you had to stop using all nonserializable cascading parameter values.
523523

aspnetcore/blazor/components/lifecycle.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Blazor apps that prerender their content on the server call <xref:Microsoft.AspN
206206

207207
:::moniker range=">= aspnetcore-8.0"
208208

209-
To prevent developer code in <xref:Microsoft.AspNetCore.Components.ComponentBase.OnInitializedAsync%2A> from running twice when prerendering, see the [Stateful reconnection after prerendering](#stateful-reconnection-after-prerendering) section. The content in the section focuses on Blazor Web Apps and stateful SignalR *reconnection*. To preserve state during the execution of initialization code while prerendering, see <xref:blazor/components/prerender#persist-prerendered-state>.
209+
To prevent developer code in <xref:Microsoft.AspNetCore.Components.ComponentBase.OnInitializedAsync%2A> from running twice when prerendering, see the [Stateful reconnection after prerendering](#stateful-reconnection-after-prerendering) section. The content in the section focuses on Blazor Web Apps and stateful SignalR *reconnection*. To preserve state during the execution of initialization code while prerendering, see <xref:blazor/state-management/persistent-component-state>.
210210

211211
:::moniker-end
212212

@@ -722,7 +722,7 @@ By combining streaming rendering with persistent component state:
722722
For more information, see the following resources:
723723

724724
* <xref:blazor/components/rendering#streaming-rendering>
725-
* <xref:blazor/components/prerender#persist-prerendered-state>.
725+
* <xref:blazor/state-management/persistent-component-state>.
726726

727727
:::moniker-end
728728

@@ -795,7 +795,7 @@ For more information on the <xref:Microsoft.AspNetCore.Mvc.TagHelpers.ComponentT
795795

796796
:::moniker range=">= aspnetcore-8.0"
797797

798-
The content in this section focuses on Blazor Web Apps and stateful SignalR *reconnection*. To preserve state during the execution of initialization code while prerendering, see <xref:blazor/components/prerender#persist-prerendered-state>.
798+
The content in this section focuses on Blazor Web Apps and stateful SignalR *reconnection*. To preserve state during the execution of initialization code while prerendering, see <xref:blazor/state-management/persistent-component-state>.
799799

800800
:::moniker-end
801801

aspnetcore/blazor/components/prerender.md

Lines changed: 1 addition & 345 deletions
Large diffs are not rendered by default.

aspnetcore/blazor/components/render-modes.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,14 @@ When using a Blazor Web App, most of the Blazor documentation example components
219219

220220
Prerendering is enabled by default for interactive components.
221221

222-
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).
222+
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/state-management/persistent-component-state#interactive-routing-and-prerendering), and [Enhanced navigation and form handling](xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling).
223223

224-
<!-- UPDATE 11.0 Tracking https://github.com/dotnet/aspnetcore/issues/55635
225-
for .NET 11 work in this area. -->
224+
<!-- UPDATE 11.0 Tracking ...
225+
226+
"prerender: false" is ignored in child components
227+
https://github.com/dotnet/aspnetcore/issues/55635
228+
229+
... for .NET 11 work in the following area. -->
226230

227231
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.
228232

aspnetcore/blazor/fundamentals/routing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ When an interactive render mode is assigned to the `Routes` component, the Blazo
2929

3030
Static routers use endpoint routing and the HTTP request path to determine which component to render. When the router becomes interactive, it uses the document's URL (the URL in the browser's address bar) to determine which component to render. This means that the interactive router can dynamically change which component is rendered if the document's URL dynamically changes to another valid internal URL, and it can do so without performing an HTTP request to fetch new page content.
3131

32-
Interactive routing also prevents prerendering because new page content isn't requested from the server with a normal page request. For more information, see <xref:blazor/components/prerender#interactive-routing-and-prerendering>.
32+
Interactive routing also prevents prerendering because new page content isn't requested from the server with a normal page request. For more information, see <xref:blazor/state-management/persistent-component-state#interactive-routing-and-prerendering>.
3333

3434
:::moniker-end
3535

@@ -190,7 +190,7 @@ app.MapRazorComponents<App>()
190190

191191
An interactive render mode can be assigned to the `Routes` component (`Routes.razor`) that makes the Blazor router become interactive after static SSR and static routing on the server. For example, `<Routes @rendermode="InteractiveServer" />` assigns interactive server-side rendering (interactive SSR) to the `Routes` component. The `Router` component inherits interactive server-side rendering (interactive SSR) from the `Routes` component. The router becomes interactive after static routing on the server.
192192

193-
Internal navigation for interactive routing doesn't involve requesting new page content from the server. Therefore, prerendering doesn't occur for internal page requests. For more information, see <xref:blazor/components/prerender#interactive-routing-and-prerendering>.
193+
Internal navigation for interactive routing doesn't involve requesting new page content from the server. Therefore, prerendering doesn't occur for internal page requests. For more information, see <xref:blazor/state-management/persistent-component-state#interactive-routing-and-prerendering>.
194194

195195
If the `Routes` component is defined in the server project, the <xref:Microsoft.AspNetCore.Components.Routing.Router.AdditionalAssemblies> parameter of the `Router` component should include the `.Client` project's assembly. This allows the router to work correctly when rendered interactively.
196196

aspnetcore/blazor/fundamentals/signalr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ For more information, see <xref:signalr/configuration#configure-additional-optio
145145

146146
:::moniker range=">= aspnetcore-8.0"
147147

148-
If prerendering is configured, prerendering occurs before the client connection to the server is established. For more information, see <xref:blazor/components/prerender>.
148+
If prerendering is configured, prerendering occurs before the client connection to the server is established. For more information, see <xref:blazor/state-management/persistent-component-state>.
149149

150150
:::moniker-end
151151

@@ -730,7 +730,7 @@ When the custom reconnect modal appears, it renders the following content with a
730730

731731
:::moniker range=">= aspnetcore-8.0"
732732

733-
By default, components are prerendered on the server before the client connection to the server is established. For more information, see <xref:blazor/components/prerender>.
733+
By default, components are prerendered on the server before the client connection to the server is established. For more information, see <xref:blazor/state-management/persistent-component-state>.
734734

735735
:::moniker-end
736736

aspnetcore/blazor/includes/prerendering.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
*This section applies to server-side apps that prerender Razor components. Prerendering is covered in <xref:blazor/components/prerender>.*
44

5+
<!-- UPDATE 10.0 - Persistent component state across enhanced nav
6+
is scheduled for Preview 7.
7+
8+
Support persistent component state across enhanced page navigations
9+
https://github.com/dotnet/aspnetcore/issues/51584
10+
-->
11+
512
> [!NOTE]
6-
> Internal navigation for [interactive routing](xref:blazor/fundamentals/routing#static-versus-interactive-routing) in Blazor Web Apps doesn't involve requesting new page content from the server. Therefore, prerendering doesn't occur for internal page requests. If the app adopts interactive routing, perform a full page reload for component examples that demonstrate prerendering behavior. For more information, see <xref:blazor/components/prerender#interactive-routing-and-prerendering>.
13+
> Internal navigation for [interactive routing](xref:blazor/fundamentals/routing#static-versus-interactive-routing) in Blazor Web Apps doesn't involve requesting new page content from the server. Therefore, prerendering doesn't occur for internal page requests. If the app adopts interactive routing, perform a full page reload for component examples that demonstrate prerendering behavior. For more information, see <xref:blazor/state-management/persistent-component-state#interactive-routing-and-prerendering>.
714
815
:::moniker-end
916

0 commit comments

Comments
 (0)