Skip to content

Commit 4ab7597

Browse files
authored
Merge pull request #34354 from dotnet/main
2 parents 179ab79 + d6cdce4 commit 4ab7597

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aspnetcore/blazor/state-management.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ else
450450
{
451451
var result = await ProtectedSessionStore.GetAsync<int>("count");
452452
CurrentCount = result.Success ? result.Value : 0;
453-
isConnected = true;
453+
isLoaded = true;
454454
}
455455
456456
public async Task IncrementCount()
@@ -469,7 +469,7 @@ else
469469
@using Microsoft.AspNetCore.ProtectedBrowserStorage
470470
@inject ProtectedSessionStorage ProtectedSessionStore
471471
472-
@if (isConnected)
472+
@if (isLoaded)
473473
{
474474
<CascadingValue Value="this">
475475
@ChildContent
@@ -481,7 +481,7 @@ else
481481
}
482482
483483
@code {
484-
private bool isConnected;
484+
private bool isLoaded;
485485
486486
[Parameter]
487487
public RenderFragment ChildContent { get; set; }
@@ -492,7 +492,7 @@ else
492492
{
493493
if (firstRender)
494494
{
495-
isConnected = true;
495+
isLoaded = true;
496496
await LoadStateAsync();
497497
StateHasChanged();
498498
}
@@ -501,7 +501,7 @@ else
501501
private async Task LoadStateAsync()
502502
{
503503
CurrentCount = await ProtectedSessionStore.GetAsync<int>("count");
504-
isConnected = true;
504+
isLoaded = true;
505505
}
506506
507507
public async Task IncrementCount()

0 commit comments

Comments
 (0)