Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4468

Can I set global rendermode "InteractiveServer" and override it to use "StaticServer" per component in a Blazor Web App?

$
0
0

I am migrating a Blazor Server App (.Net 7) to the new Blazor Web App (.Net 8).

The project also includes some Razor pages (cshtml) which I now would like to migrate to the new Static Server Rendering (SSR).

Is it possible to declare the global rendermode "InteractiveServer" in the routes component: <Routes @rendermode="InteractiveServer" /> and overriding some components to use rendermode "StaticServer"? The option does not seem to be available in the Enumeration.

The other option would be to not set the global rendermode "InteractiveServer", but declare it per component. I am currently trying to get this to work, but it is breaking a lot of the existing functionality so I would prefer it the other way around.

So in short, how can I set a global rendermode "InteractiveServer" and override it to use "StaticServer" for a few pages/components?


Viewing all articles
Browse latest Browse all 4468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>