Open
Description
When I call local functions in @{} block inside a .razor component tag the content from the local function isn't getting rendered.
Home.razor
@page "/"
<h1>Issue showcase</h1>
<IssueComponent>
<span>Hello 1</span>
</IssueComponent>
<IssueComponent>
@{
IssueLocalFunction();
}
</IssueComponent>
@{
void IssueLocalFunction()
{
<span>Hello 2</span>
}
}
IssueComponent.razor
@ChildContent
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
}
Output
It's getting showed when is prerendering but then it disappears.
Here is my repo with that issue:
https://github.com/EngieDev/BlazorComponentsIssue
Activity