You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't have a way to dynamically switch from server-interactivity to WebAssembly interactivity, and starting up the WebAssembly blocks the UI thread, which usually takes less than 0.5 second on the published app. This is something on our mind and hopefully sometime in the future we come up with a better solution here.
@mkArtakMSFT - You might be thinking about a different scenario than what I encountered.
It behaves correctly (counter button is responsive) if I wait longer before selecting counter page. This suggests that in the failed test, at the time Blazor went to counter page, WebAsm was not ready (still downloading perhaps?), but Blazor switched to WebAsm anyway.
To be clear: I am not asking for dynamic switching. I encountered a situation where (AFAIK) it would work better to not switch to WebAsm yet. Stay on Server Render until a SECOND page switch. Is there a downside to delaying that long?
When user switches page, is it easy to determine whether WebAssembly is ready to start up?
Currently, there does not appear to be such a check. Blazor simply assumes the first page switch, it can switch to WebAsm. Even if WebAssembly is still being downloaded. At least that is how I interpret the tests I did.
Is my understanding of what is happening incorrect? Is there logic in Blazor to check whether WebAsm is available / can be started now? Is that check done at the time user selects a different page?
Is there an existing issue for this?
Describe the bug
New Project / Blazor Web App / Interactive Render Mode = Auto.
Launch under debugger. Quickly switch to Counter page, and quickly press Counter.
It does not respond (WASM not yet loaded).
Expected Behavior
Counter is always responsive.
(Stay in Server Render Mode, until a page switch occurs AND WASM is ready.)
IMHO, this should be the default behavior: "Keep simple cases simple".
To put it another way: what possible benefit is there to switching to client rendering when Blazor knows perfectly well that cannot work yet!
Steps To Reproduce
See bug description.
Exceptions (if any)
No response
.NET Version
latest 8.0
Anything else?
This bug appears to be "by design", and probably covered by #53799,
as well as similar issues.
Nevertheless, even the simplest app reveals a problem with the current logic for switching between server and client rendering.
Please don't lose sight of this fact.
The text was updated successfully, but these errors were encountered: