From 8f3eb84a1d94d38e8b4d8eb6b2baddc2a4280b34 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 14 Nov 2023 06:13:38 -0500 Subject: [PATCH 1/3] Blazor What's New updates 8.0 --- aspnetcore/release-notes/aspnetcore-8.0.md | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/aspnetcore/release-notes/aspnetcore-8.0.md b/aspnetcore/release-notes/aspnetcore-8.0.md index 670d459668ee..3985a3fb9b77 100644 --- a/aspnetcore/release-notes/aspnetcore-8.0.md +++ b/aspnetcore/release-notes/aspnetcore-8.0.md @@ -28,8 +28,6 @@ For more information, see the following articles: * : New sections on rendering and static/interactive concepts appear at the top of the article. * -* -* * **Migration coverage**: 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 * * +### Blazor start changes for Blazor Web Apps + +For Blazor Server, Blazor WebAssembly, and Blazor Hybrid apps: + +* `beforeWebStart` is used for tasks such as customizing the loading process, logging level, and other options. +* `afterWebStarted` is used for tasks such as registering Blazor event listeners and custom event types. + +The preceding legacy JS initializers aren't invoked by default in a Blazor Web App. For Blazor Web Apps, a new set of startup functions are used: `beforeWebStart`, `afterWebStarted`, `beforeServerStart`, `afterServerStarted`, `beforeWebAssemblyStart`, and `afterWebAssemblyStarted`. + +For more information, see . + ### Split of prerendering and integration guidance 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 ### Persist component state in a Blazor Web App -You can persist and read component state in a Blazor Web App using the existing 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). +You can persist and read component state in a Blazor Web App using the existing 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 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). ### Form handling and model binding @@ -80,6 +91,12 @@ For more information, see the following sections of the Blazor *Routing* article * [Enhanced navigation and form handling](xref:blazor/fundamentals/routing?view=aspnetcore-8.0&preserve-view=true#enhanced-navigation-and-form-handling) * [Location changes](xref:blazor/fundamentals/routing#location-changes?view=aspnetcore-8.0&preserve-view=true#location-changes) +### New article on static rendering with enhanced navigation for JS interop + +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: + + + ### Streaming rendering 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 For more information, see the following articles: -[AOT: Single Instruction, Multiple Data (SIMD)](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#single-instruction-multiple-data-simd) -[AOT: Exception handling](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#exception-handling) +* [AOT: Single Instruction, Multiple Data (SIMD)](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#single-instruction-multiple-data-simd) +* [AOT: Exception handling](xref:blazor/tooling?view=aspnetcore-8.0&pivots=windows&preserve-view=true#exception-handling) ### Web-friendly Webcil packaging From 18711f237626be1ff4c8fa7f3f9d131122bd7616 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 14 Nov 2023 06:26:39 -0500 Subject: [PATCH 2/3] Updates --- aspnetcore/release-notes/aspnetcore-8.0.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aspnetcore/release-notes/aspnetcore-8.0.md b/aspnetcore/release-notes/aspnetcore-8.0.md index 3985a3fb9b77..4ada08def3d1 100644 --- a/aspnetcore/release-notes/aspnetcore-8.0.md +++ b/aspnetcore/release-notes/aspnetcore-8.0.md @@ -1033,3 +1033,8 @@ For more information, see [IProblemDetailsService fallback](xref:fundamentals/mi ## gRPC --> + +## Additional resources + +* [ASP.NET Core annoucements and breaking changes (`aspnet/Annoucements` GitHub repository)](https://github.com/aspnet/Announcements/issues) +* [.NET annoucements and breaking changes (`dotnet/Annoucements` GitHub repository)](https://github.com/dotnet/announcements/issues) From 85a6c961a0c0c85540aab09870b707cda1763ee3 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 14 Nov 2023 06:45:51 -0500 Subject: [PATCH 3/3] Updates --- aspnetcore/release-notes/aspnetcore-8.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnetcore/release-notes/aspnetcore-8.0.md b/aspnetcore/release-notes/aspnetcore-8.0.md index 4ada08def3d1..869073b1f5aa 100644 --- a/aspnetcore/release-notes/aspnetcore-8.0.md +++ b/aspnetcore/release-notes/aspnetcore-8.0.md @@ -46,16 +46,16 @@ For more information on the new Blazor Web App template, see the following artic * * -### Blazor start changes for Blazor Web Apps +### New JS initializers for Blazor Web Apps For Blazor Server, Blazor WebAssembly, and Blazor Hybrid apps: * `beforeWebStart` is used for tasks such as customizing the loading process, logging level, and other options. * `afterWebStarted` is used for tasks such as registering Blazor event listeners and custom event types. -The preceding legacy JS initializers aren't invoked by default in a Blazor Web App. For Blazor Web Apps, a new set of startup functions are used: `beforeWebStart`, `afterWebStarted`, `beforeServerStart`, `afterServerStarted`, `beforeWebAssemblyStart`, and `afterWebAssemblyStarted`. +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`. -For more information, see . +For more information, see . ### Split of prerendering and integration guidance