OnAfterRenderAsync always execute twice

Posted 37 days ago by leowidodo
0

Why this code always execute twice?

Any one can help ? I already use .Net 5 version. Is there any update of this problem?

protected override async Task OnAfterRenderAsync(bool firstRender)

   {       

Console.WriteLine("\n\n\nHello There");

   }

 

Thanks

  • 0

    You still need to make sure it's the first render.

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
    	if(firstRender)
    		Console.WriteLine("\n\n\nHello There");
    }
    Posted 35 days ago by selliott Edited 35 days ago
Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 1
An error has occurred. This application may no longer respond until reloaded. Reload 🗙