@rendermode InteractiveServer @using System.Threading Counter

Counter

Current count: @currentCount

@code { private static int currentCount = 0; [Parameter] public int IncrementAmount { get; set; } = 1; private void IncrementCount() { currentCount += 1; } }