ComponentBase.OnAfterRenderAsync(Boolean) Method

Definition

Method invoked after each time the component has been rendered. Note that the component does not automatically re-render after the completion of any returned Task, because that would cause an infinite render loop.

protected:
 virtual System::Threading::Tasks::Task ^ OnAfterRenderAsync(bool firstRender);
protected virtual System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender);
abstract member OnAfterRenderAsync : bool -> System.Threading.Tasks.Task
override this.OnAfterRenderAsync : bool -> System.Threading.Tasks.Task
Protected Overridable Function OnAfterRenderAsync (firstRender As Boolean) As Task

Parameters

firstRender
Boolean

Set to true if this is the first time OnAfterRender(Boolean) has been invoked on this component instance; otherwise false.

Returns

Task

A Task representing any asynchronous operation.

Remarks

The OnAfterRender(Boolean) and OnAfterRenderAsync(Boolean) lifecycle methods are useful for performing interop, or interacting with values received from @ref. Use the firstRender parameter to ensure that initialization work is only performed once.

Applies to