carbontsunami
.NET 8, Blazor InteractiveServer with StreamRendering causing double rendering
private List<TodoItem>? todos;
protected override async Task OnInitializedAsync()
{
//
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await Task.Delay(1000);
// love the new collection expressions btw!!
todos = [new TodoItem(), new TodoItem(), new TodoItem()];
StateHasChanged();
}
}
3 replies