title: Display a page loading bar progress before page is loaded
body: <p>Recently in Blazor I discovered that using a <code>RenderMode</code> of <code>ServerPrerendered</code> in conjunction with calling initial data in <code>OnInitializedAsync</code> causes <code>OnInitializedAsync</code> to be called twice. This causes a brief UI flash, and if I'm not pulling data from cache and straight from the database, a extra db call is made, no bueno. So I switched to using <code>OnAfterRenderAsync</code> and calling only when <code>firstRender</code> is true. This takes care of the extra call and doesn't have a UI flash, it feels nicer. However there is brief moment where not the entire page has rendered, and I'm waiting for it to load. What I would like to implement is a loading bar at the top of the page to indicate load progress, similar to what YouTube does.</p>
  <p>I was wondering which life cycle events from the moment a hyper link is clicked to the page being rendered I need to use to make this happen? I am also assuming that I will need to use a Singleton AppState to track the load progress based on some current value over a total value to generate the bar completion progress percent.</p>
  <p>I think I know what do do and I'm starting to try it, but I was wondering what other solutions you guys have come up with in Blazor? Any tips or suggestions?</p>