Open
Description
Based on my experimentations, Bolero is mostly compatible with the new .NET 8 Blazor interactive modes (aka Blazor United, ie InteractiveServer
, InteractiveClient
and InteractiveAuto
render modes). See https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0
There is a caveat that Bolero's routing is not compatible with having different render modes for different pages; you need to specify a mode on the ProgramComponent
. Using different render modes for different pages only works with Blazor's built-in, attribute-based routing.
We need some improvements to integrate it better:
- An attribute to put on a component to indicate its render mode. For .razor components, Blazor generates a custom attribute for each component that has a
@rendermode
; we can instead create one attribute that takes an enum as argument to specify the render mode. - Add an option to
AddBoleroHost
, or an alternative method, that enables interactive render modes. This will makeboleroScript
always include_framework/blazor.web.js
instead of*.server.js
or*.webassembly.js
. - Add an option to the project template to use interactive modes.
Activity