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

.NET 9.0 No interactivity until the WASM switch on the Counter page with InteractiveAuto [closed]

$
0
0

In the default Blazor web app (Auto), there is no interactivity on the counter page with InteractiveAuto until it loads and switches to WASM.

Based on the description of the InteractiveAuto mode, I expected a completely different behavior. Is this really the expected and normal behavior of Blazor in this case?

@page "/counter"@rendermode InteractiveAuto<PageTitle>Counter</PageTitle><h1>Counter</h1><h1 class="text-muted">Render @(OperatingSystem.IsBrowser() ? "Wasm" : "Server")</h1><p role="status">Current count: @currentCount</p><button class="btn btn-primary" @onclick="IncrementCount">Click me</button>@code {    private int currentCount = 0;    private void IncrementCount()    {        currentCount++;    }}

In my pet project, it is very important to have interactivity before fully switching to WASM; otherwise, the architecture with proxy implementations of services for server and WASM rendering loses any meaning. I don't even know what advice to ask for if this is normal expected behavior for Blazor in this case, but if you can, please suggest something.


Viewing all articles
Browse latest Browse all 4839

Trending Articles