The Microsoft Blazor render modes documentation says we can programmatically set the RenderMode for a component like:
@rendermode renderModeForPage
...
@code {
private static IComponentRenderMode renderModeForPage = InteractiveServer;
}
I want to be able to dynamically switch the mode from static to InteractiveServer, but I can't work out how to set the page to Static SSR (which would be the default). I can only set renderModeForPage to InteractiveServer, InteractiveWebAssemmbly or InteractiveAuto, which implies we can't programmatically set a component to Static SSR? It won't allow me to set rendermode to null.