Previous tip (Employ a little conditional CSS to shake up your UI)

Toggle Prerendering off

Interactive Blazor components are prerendered by default in .NET 8.

Your component will be rendered once on the server, then again when it runs in one of the interactive modes.

This can lead to a visible ‘flash’ in the UI as the data is fetched for a second time.

If you don’t need prerendering you can switch it off when you declare the render mode for a component.

@page "/"
@rendermode
@(new InteractiveServerRenderMode(false))
<h1>Hello</h1>

More details

Want to keep your prerendering? Your other option is to persist state during the first render and fetch it during the second.