title: Blazor doesn't rerender to show my object
body: <p>I just started a new blazor project (WASM, not Server) to learn how it works, so excuse my ignorance if it seems like I'm doing something silly.</p>
  <p>Using .NET 5</p>
  <p>The page is supposed to make a call to a locally hosted API (which I have checked works) and then display the information it gets on the page I'm loading. Reading documentation and the Blazor component life cycle shows that using <code>OnInitializedAsync()</code> might be my best bet, because I want to do the call, but without blocking the webpage and seeing as I am using a <code>ParameterAttribute</code> here, I'd need to wait until the parameter is bound first (to my understanding at least).</p>
  <p>What I get is that after the call is done, it should cause the page to re-render, showing off my objects info on the page.</p>
  <p>Here is my <code>GameDetails.razor</code> file:</p>
  <pre class="lang-cs prettyprint-override"><code>@page &quot;/gamedetails/{gameId:int}&quot;
  @inject HttpClient HttpClient
  @inject NavigationManager NavManager
  
  &lt;h1&gt;Game Details&lt;/h1&gt;
  
  @if (_game != null)
  {
      &lt;p&gt;
          Id: @_game.Id&lt;br /&gt;
          Title: @_game.Title&lt;br /&gt;
          Year: @_game.Year&lt;br /&gt;
          Developer: @_game.Developer&lt;br /&gt;
          Publisher: @_game.Publisher&lt;br /&gt;
          Region: @_game.Region&lt;br /&gt;
          Region Code: @_game.ShortRegion &lt;br /&gt;
          Keymaps: @_game.KeyMaps
      &lt;/p&gt;
  }
  
  @code {
      [ParameterAttribute]
      public int gameId { get; set; }
  
      private GameSearchResult _game;
  
      protected override async Task OnInitializedAsync()
      {
          string url = $&quot;Mappings?gameId={gameId}&quot;;
          _game = await HttpClient.GetFromJsonAsync&lt;GameSearchResult&gt;(url, new JsonSerializerOptions()
          {
              PropertyNamingPolicy = JsonNamingPolicy.CamelCase
          });
      }
  }
  </code></pre>
  <p>What's supposed to happen is that you click a card on a different page, which then Navigates you to this page, which then requests information from the API to show on the page.</p>
  <p>What actually happens is that the page loads, but none of my information is shown. I have debugged and seen that the information is retrieved successfully and stored in my <code>GameSearchResult</code> object called <code>_game</code>, so my guess is that the page is not rerendered as I'd have thought it should be.</p>
  <p>I have tried to call <code>StateHasChanged()</code> as some has suggested elsewhere to try and force the re-render, but still nothing.</p>
  <p>What should I do instead to get the wanted behaviour? I can accept that the whole call is Synchronous too, it doesn't bother me.</p>