Current count in component: @Count
@code {
[Parameter]
public int Count { get; set; }
[Parameter]
public EventCallback CountChanged { get; set; }
private void Increment()
{
CountChanged.InvokeAsync(Count + 1);
}
private void Decrement()
{
CountChanged.InvokeAsync(Count - 1);
}
}