@page "/ephemeral" @inject IJSRuntime JS @inject State State Eph.emer.al is a place for fleeting thoughts. Everything on this page will disappear after a while.
@if (messages != null) { foreach (MarkupString message in messages) {
@message
} }
@code { private List? messages; protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); if (messages == null || messages.Count == 0) messages = await State.GetEphemeralMessages(); await InvokeAsync(StateHasChanged); await JS.InvokeVoidAsync("removeElementById", "ephemeral-loading"); } }