title: Blazor: Component doesn't update every time the for loop spins
body: <p>I am currently working on a Blazor project and facing with a bug. The plan is to update a component in every second, as long as the for loop updates. My problem is a bit complex, so I reproduced this bug in another project:</p>
  
  <p>The Calculate.cs file where the calculations happen:</p>
  
  <pre><code>public class Calculate
  {
      public void Calc(Index index)
      {
          for (int i = 0; i &lt; 10; i++)
          {
              Thread.Sleep(1000);
              index.Update(i);
          }
      }
  }
  </code></pre>
  
  <p>The index.razor file:</p>
  
  <pre><code>&lt;button class="btn btn-primary" @onclick="Test"&gt;Click me&lt;/button&gt;
  
  &lt;p&gt;Test number: @testNumber&lt;/p&gt;
  
  @code
  {
      private int testNumber;
      Calculate c = new Calculate();
  
      public void Test()
      {
          c.Calc(this);   
      }
      public void Update(int i)
      {
          testNumber = i;
          Debug.WriteLine(i);
      }
  }
  </code></pre>
  
  <p>After testing, the Debug Console prints the numbers as it should in every second, all the way from 0-9, but the opened Blazor display only prints the 9, whenever the calculations and the 10 seconds are over.</p>