Skip to content

Commit 8eb6167

Browse files
authored
Blazor What's New updates 8.0 (#31019)
1 parent b1da13c commit 8eb6167

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

aspnetcore/release-notes/aspnetcore-8.0.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ For more information, see the following articles:
2828

2929
* <xref:blazor/fundamentals/index?view=aspnetcore-8.0&preserve-view=true>: New sections on rendering and static/interactive concepts appear at the top of the article.
3030
* <xref:blazor/components/render-modes?view=aspnetcore-8.0&preserve-view=true>
31-
* <xref:blazor/fundamentals/startup?view=aspnetcore-8.0&preserve-view=true>
32-
* <xref:blazor/js-interop/ssr?view=aspnetcore-8.0&preserve-view=true>
3331
* **Migration coverage**: <xref:migration/70-to-80#blazor>
3432

3533
Examples throughout the Blazor documentation have been updated for use in Blazor Web Apps. Blazor Server examples remain in content versioned for .NET 7 or earlier.
@@ -48,6 +46,17 @@ For more information on the new Blazor Web App template, see the following artic
4846
* <xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true>
4947
* <xref:blazor/project-structure?view=aspnetcore-8.0&preserve-view=true>
5048

49+
### New JS initializers for Blazor Web Apps
50+
51+
For Blazor Server, Blazor WebAssembly, and Blazor Hybrid apps:
52+
53+
* `beforeWebStart` is used for tasks such as customizing the loading process, logging level, and other options.
54+
* `afterWebStarted` is used for tasks such as registering Blazor event listeners and custom event types.
55+
56+
The preceding legacy JS initializers aren't invoked by default in a Blazor Web App. For Blazor Web Apps, a new set of JS initializers are used: `beforeWebStart`, `afterWebStarted`, `beforeServerStart`, `afterServerStarted`, `beforeWebAssemblyStart`, and `afterWebAssemblyStarted`.
57+
58+
For more information, see <xref:blazor/fundamentals/startup?view=aspnetcore-8.0&preserve-view=true#javascript-initializers>.
59+
5160
### Split of prerendering and integration guidance
5261

5362
For prior releases of .NET, we covered prerendering and integration in a single article. To simplify and focus our coverage, we've split the subjects into the following new articles, which have been updated for .NET 8:
@@ -57,7 +66,9 @@ For prior releases of .NET, we covered prerendering and integration in a single
5766

5867
### Persist component state in a Blazor Web App
5968

60-
You can persist and read component state in a Blazor Web App using the existing <xref:Microsoft.AspNetCore.Components.PersistentComponentState> service. This is useful for [persisting component state during prerendering](xref:blazor/components/prerender?view=aspnetcore-8.0&preserve-view=true#persist-prerendered-state). Blazor Web Apps automatically persist any registered state during prerendering, removing the need for the [Persist Component State Tag Helper](xref:mvc/views/tag-helpers/builtin-th/persist-component-state-tag-helper).
69+
You can persist and read component state in a Blazor Web App using the existing <xref:Microsoft.AspNetCore.Components.PersistentComponentState> service. This is useful for [persisting component state during prerendering](xref:blazor/components/prerender?view=aspnetcore-8.0&preserve-view=true#persist-prerendered-state).
70+
71+
Blazor Web Apps automatically persist any registered app-level state created during prerendering, removing the need for the [Persist Component State Tag Helper](xref:mvc/views/tag-helpers/builtin-th/persist-component-state-tag-helper).
6172

6273
### Form handling and model binding
6374

@@ -80,6 +91,12 @@ For more information, see the following sections of the Blazor *Routing* article
8091
* [Enhanced navigation and form handling](xref:blazor/fundamentals/routing?view=aspnetcore-8.0&preserve-view=true#enhanced-navigation-and-form-handling)
8192
* [Location changes](xref:blazor/fundamentals/routing#location-changes?view=aspnetcore-8.0&preserve-view=true#location-changes)
8293

94+
### New article on static rendering with enhanced navigation for JS interop
95+
96+
Some apps depend on JS interop to perform initialization tasks that are specific to each page. When using Blazor's enhanced navigation feature with statically-rendered pages that perform JS interop initialization tasks, page-specific JS may not be executed again as expected each time an enhanced page navigation occurs. A new article explains how to address this scenario in Blazor Web Apps:
97+
98+
<xref:blazor/js-interop/ssr?view=aspnetcore-8.0&preserve-view=true>
99+
83100
### Streaming rendering
84101

85102
You can now stream content updates on the response stream when using static server rendering with Blazor. Streaming rendering can improve the user experience for pages that perform long-running asynchronous tasks in order to fully render by rendering content as soon as it's available.
@@ -180,8 +197,8 @@ Blazor WebAssembly ahead-of-time (AOT) compilation now uses [WebAssembly Fixed-w
180197

181198
For more information, see the following articles:
182199

183-
[AOT: Single Instruction, Multiple Data (SIMD)](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#single-instruction-multiple-data-simd)
184-
[AOT: Exception handling](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#exception-handling)
200+
* [AOT: Single Instruction, Multiple Data (SIMD)](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#single-instruction-multiple-data-simd)
201+
* [AOT: Exception handling](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#exception-handling)
185202

186203
### Web-friendly Webcil packaging
187204

@@ -1016,3 +1033,8 @@ For more information, see [IProblemDetailsService fallback](xref:fundamentals/mi
10161033

10171034
## gRPC
10181035
-->
1036+
1037+
## Additional resources
1038+
1039+
* [ASP.NET Core annoucements and breaking changes (`aspnet/Annoucements` GitHub repository)](https://github.com/aspnet/Announcements/issues)
1040+
* [.NET annoucements and breaking changes (`dotnet/Annoucements` GitHub repository)](https://github.com/dotnet/announcements/issues)

0 commit comments

Comments
 (0)