@page "/tasks"

Tasks - (@taskList.Count(task => !task.IsComplete)) incomplete

@code { private IList taskList = new List(); private string? newTask; private void AddTask() { if (!string.IsNullOrWhiteSpace(newTask)) { taskList.Add(new TaskItem { Name = newTask }); newTask = string.Empty; } } }