title: Update a property asynchronous
body: <p>When a property of my ViewModel is updated, other property is updated asynchronous.</p>
  
  <p>Todo.cshtml:</p>
  
  <pre><code>@page "/todo"
  
  &lt;h1&gt;Todo (@todos.Count(todo =&gt; !todo.IsDone))&lt;/h1&gt;
  
  &lt;ul&gt;
      @foreach (var todo in todos)
      {
          &lt;li&gt;
              &lt;input type="checkbox" bind="@todo.IsDone" /&gt;
              &lt;input bind="@todo.Title" /&gt;
          &lt;/li&gt;
      }
  &lt;/ul&gt;
  
  &lt;input placeholder="Something todo" bind="@newTodo"/&gt;
  &lt;button onclick="@AddTodo"&gt;Add todo&lt;/button&gt;
  
  @functions {
      IList&lt;TodoItem&gt; todos = new List&lt;TodoItem&gt;();
  
  
      string newTodo;
      void AddTodo()
      {
          if (!string.IsNullOrWhiteSpace(newTodo))
          {
              todos.Add(new TodoItem { Title = newTodo });
              newTodo = string.Empty;
          }
      }
  }
  </code></pre>
  
  <p>TodoItem.cs:</p>
  
  <pre><code>public class TodoItem
  {
      private bool _isDone;
  
      public string Title { get; set; }
      public bool IsDone
      {
          get =&gt; _isDone;
          set
          {
              _isDone = value;
              Task.Run(() =&gt;
              {
                  //Simulate work
                  System.Threading.Thread.Sleep(TimeSpan.FromSeconds(2));
                  //Update property
                  Title = Title + " - Done";
              });
          }
      }
  }
  </code></pre>
  
  <p>In synchronous (without Task.Run) this work fine, but in asynchronous the UI isn't updated.</p>
  
  <p>I need explain the UI to update with <code>StateHasChanged()</code>:
  <a href="https://github.com/aspnet/Blazor/issues/1413" rel="nofollow noreferrer">https://github.com/aspnet/Blazor/issues/1413</a></p>
  
  <p>But I can't call this method in TodoItem (and I don't want TodoItem know Blazor component).</p>
  
  <p>Have you a solution to update the UI?</p>