@* Note that @rendermode="InteractiveServer" can be used here on Routes to make it global. But this is not recommended by Microsoft. See: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-9.0 *@
@code { @* Use for .NET 9, and make interactivity global in Routes and HeadOutlet components in App.razor file. *@ @* See: https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-9.0?view=aspnetcore-9.0#add-static-server-side-rendering-ssr-pages-to-a-globally-interactive-blazor-web-app *@ [CascadingParameter] private HttpContext HttpContext { get; set; } = default!; private IComponentRenderMode? PageRenderMode => HttpContext.AcceptsInteractiveRouting() ? InteractiveServer : null; }