diff --git a/aspnetcore/blazor/state-management.md b/aspnetcore/blazor/state-management.md index fb5a2bb7a49f..35e48eb6c00b 100644 --- a/aspnetcore/blazor/state-management.md +++ b/aspnetcore/blazor/state-management.md @@ -450,7 +450,7 @@ else { var result = await ProtectedSessionStore.GetAsync("count"); CurrentCount = result.Success ? result.Value : 0; - isConnected = true; + isLoaded = true; } public async Task IncrementCount() @@ -469,7 +469,7 @@ else @using Microsoft.AspNetCore.ProtectedBrowserStorage @inject ProtectedSessionStorage ProtectedSessionStore -@if (isConnected) +@if (isLoaded) { @ChildContent @@ -481,7 +481,7 @@ else } @code { - private bool isConnected; + private bool isLoaded; [Parameter] public RenderFragment ChildContent { get; set; } @@ -492,7 +492,7 @@ else { if (firstRender) { - isConnected = true; + isLoaded = true; await LoadStateAsync(); StateHasChanged(); } @@ -501,7 +501,7 @@ else private async Task LoadStateAsync() { CurrentCount = await ProtectedSessionStore.GetAsync("count"); - isConnected = true; + isLoaded = true; } public async Task IncrementCount()