Use the aura:valueRender Event Instead of a Custom Renderer

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.

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.