Anyone knows why the below doesn't work? If I remove "onclick" event then it compiles & works as expected. Is that we are not allowed to use event within Reusable RenderFragments?
Env: ASP.NET Core 3.1 & Blazor Web Assembly
Thanks a lot for the help in advance!
Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
@code {
RenderFragment<(CategoryDto category, int myId)> rf =
val => __builder =>
{
<h1 @onclick="()=> Console.WriteLine(val.category.Name)">Hello @val.category.Name, @val.myId</h1>
};
}
