.NET 8 Preview 7 - Auto Switch from Blazor Server to Web Assembly now available!

preview_player
Показать описание
With the latest preview version of .NET 8 (Preview 7), you now have the ability to have Web Assembly components render first on the server while they are downloading in the background to provide for a quick response time for your application while still offloading processing to the web browser.

What are the ramifications of this though? I talk about them in this quick video demonstrating the new feature.
Рекомендации по теме
Комментарии
Автор

Thanks! For your next videos could you make them a bit louder?

ErtyHackward
Автор

Just like my previous comment on your video regarding upcoming features in .NET 8 (that comment was not visible after I posted it though) my opinion is still the same. I would have enjoyed much more if they did not separate those 2 modes, but rather let them live alongside. I would imagine my project like such: Program.Server.cs Program.Client.cs, Component.cs and inside of each component [ServerOnly]/[ClientOnly] attributes for the properties holding information. I don't see any potential issue for [ClientOnly] properties to be passed down on initial render from the server to be loaded later into the client without having to implement the boilerplate that they currently present as solution. They could have also added to the ComponentBase a flag IsServer, and based on that to call the service that we want, either DB or HTTP. In the end, the code is the same, and there is no reason for server and client side to be separate, because they do the same, just their resource retrieve are different.

dczoekj
Автор

Put the counter state to the local storage

vdiden
Автор

The auto-switching feature from Server to WASM as soon as wasm downloads is new.. they didn't talk about it like this in the previous talks, I think.. in the previous versions it didn't autoswitch, rather it changes from Server to WASM when you redirected to other page and then came back to Counter page. It made more sense to me like this. This whole thing with caching state for the autoswitch seems like unnecessary pain.

dmtuan