@inject NotificationManager Notification
@implements IDisposable

<div class="notifications">
@foreach (var message in Notification.Messages)
{
    <p>@message</p>
}
</div>

@code {
  protected override void OnInitialized()
  {
    Notification.OnChange += StateHasChanged;
  }

  public void Dispose()
  {
    Notification.OnChange -= StateHasChanged;
  }
}