Is this possible? That OnAfterRenderAsync() will be called before OnInitializedAsync() completes?
If so, I then need to have my code in OnAfterRenderAsync(), in this case, be called at the end of OnInitializedAsync() instead. It's a piece of cake to have a method that is called from each and whoever is 2nd executes it.
In this case is a counter inside a lock { ... } the best approach? Or should I take another approach?
In _Host.cshtml I have:
<component type="typeof(HeadOutlet)" render-mode="Server" />In this mode OnInitializedAsync() is called once.