@using System.Text; @inherits LayoutComponentBase @inject NavigationManager navigator @inject Blazored.LocalStorage.ILocalStorageService localStorage @if (Program.CCharsLeft > 0) { Back @("CChars left: " + Program.CCharsLeft) } @Body @code { protected override async Task OnInitializedAsync() { Program.UpdateUiEvent += OnUiUpdate; } void OnUiUpdate() => StateHasChanged(); }