@implements IDisposable; @inject IDialogService DialogService @code { protected override void OnInitialized() { base.OnInitialized(); DialogService.Subscribe(OnUpdate); } void IDisposable.Dispose() { DialogService.Unsubscribe(OnUpdate); } void OnUpdate() { StateHasChanged(); } }