Counter

Current count: @currentCount.ToString()

@functions { int currentCount = 0; void OnButtonClicked(Microsoft.Blazor.RenderTree.UIEventArgs eventArgs) { currentCount++; } }