StateHasChanged is not Rendering the component when even Action is invoked

Advertisements I’m trying to trigger StateHasChanged when the button is clicked. This is done by adding StateHasChanged to event Action. When debugging I can see that the Invoke method of the event is being fired but the UI is not re-rendering. This is the flow I want it work like: The button is clicked in… Read More StateHasChanged is not Rendering the component when even Action is invoked

Beginner Blazor issue: cannot convert from 'method group' to 'EventCallback'

Advertisements I am creating my first Blazor app and I have two components named child and parent: child: <div class="alert alert-primary" role="alert"> @Title </div> <div class="alert alert-primary" role="alert"> @ChildContent </div> <button type="button" class="btn btn-primary" @onclick="onClickMethod">Primary</button> @code { [Parameter] public string Title { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } [Parameter] public… Read More Beginner Blazor issue: cannot convert from 'method group' to 'EventCallback'

Blazor – Function call is trying to be a callback

Advertisements I’m currently in the process of learning Blazor Server, and I’m not sure why I’m getting the error I’m getting. I’m getting CS1503 Argument2: cannot convert from ‘void’ to ‘Microsoft.AspNetCore.Components.EventCallback’ when entering a parameter for remove. Edit I realized why it’s saying that it’s a callback, but I’m not sure why it can’t pass… Read More Blazor – Function call is trying to be a callback