Class WasmSuspense
Provides a mechanism to show a loading state for a wasm component without prerendering.
public class WasmSuspense : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
- Inheritance
-
WasmSuspense
- Implements
- Inherited Members
Constructors
WasmSuspense()
public WasmSuspense()
Properties
Content
The main content to display once it has loaded. This is the content that will be rendered once the loading is complete. It can be any Blazor component or markup that you want to display, but for this to actually do anything, it needs to be set to render in InteractiveWebAssembly mode, while the host is rendered server side.
[Parameter]
[EditorRequired]
public required RenderFragment Content { get; set; }
Property Value
WaitingContent
The content to display while waiting for the main content to load. This is typically a loading spinner or placeholder.
[Parameter]
[EditorRequired]
public required RenderFragment WaitingContent { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder