Handle the render Event

When a component is rendered or rerendered, the aura:valueRender event, also known as the render event, is fired. Handle this event to perform post-processing on the DOM or react to component rendering or rerendering. The event is preferred and easier to use than the alternative of creating a custom renderer.

The render event is fired after all methods in a custom renderer are invoked. For more details on the sequence in the rendering or rerendering lifecycles, see Create a Custom Renderer.

Handling the aura:valueRender event is similar to handling the init hook. Add a handler to your component's markup.

<aura:handler name="render" value="{!this}" action="{!c.onRender}"/>

In this example, the onRender action in your client-side controller handles initial rendering and rerendering of the component. You can choose any name for the action attribute.