Closed
Description
[EDIT by guardrex to add the metadata]
We don't currently have a great way to display a loading UI for interactive WebAssembly rendering, but as @javiercn pointed out there is a way to do it:
- Prerender a wrapper component that displays the placeholder on the page.
- Inside the wrapper, render your component with prerender: false
- Have the wrapper use
@if(OsPlatform.IsBrowser())
to distinguish between SSR and WebAssembly and render your placeholder or the actual component.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/startup?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/fundamentals/startup.md
Document ID
11f8db3d-9988-e0a1-89c5-c3552ee47b93
Article author
guardrex
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done