diff --git a/samples/TodoApp/UI/Shared/BarConnectionStatus.razor b/samples/TodoApp/UI/Shared/BarConnectionStatus.razor index dd5d180b..5eef1c1a 100644 --- a/samples/TodoApp/UI/Shared/BarConnectionStatus.razor +++ b/samples/TodoApp/UI/Shared/BarConnectionStatus.razor @@ -35,8 +35,14 @@ [Parameter] public string CssClass { get; set; } = ""; - protected override IState CreateState() - => Monitor.State; + protected override void OnInitialized() + { + State = Monitor.State; + base.OnInitialized(); + } + + public override ValueTask DisposeAsync() + => default; // State shouldn't be disposed private void Reconnect() => Services.RpcHub().InternalServices.ClientPeerReconnectDelayer.CancelDelays(); diff --git a/samples/TodoApp/UI/Shared/TextConnectionStatus.razor b/samples/TodoApp/UI/Shared/TextConnectionStatus.razor index 1e8da1e4..1bdf2557 100644 --- a/samples/TodoApp/UI/Shared/TextConnectionStatus.razor +++ b/samples/TodoApp/UI/Shared/TextConnectionStatus.razor @@ -24,8 +24,14 @@ [Parameter] public string CssClass { get; set; } = ""; - protected override IState CreateState() - => Monitor.State; + protected override void OnInitialized() + { + State = Monitor.State; + base.OnInitialized(); + } + + public override ValueTask DisposeAsync() + => default; // State shouldn't be disposed private void Reconnect() => Services.RpcHub().InternalServices.ClientPeerReconnectDelayer.CancelDelays();