[SalesForce] lightning component re-render event

Is there a re-render event for lightning component? When a component is first rendered we can use init event to invoke init functions. Is there any event that can be handled when aura:renderIf condition is set to true after it was set to false in the following code snippet?

Init event

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

Render If

    <aura:renderIf isTrue="{!v.showCatalog}">
            <c:Catalog id="{!v.id}" 
            products="{!v.products}" />
    </aura:renderIf>

Best Answer

One can use renderer.js in the lightning framework. Rerender is an inbuilt event provided within the renderer.js which gets fired whenever the component property modifies. Refer to this link for more information. https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_renderers.htm

Related Topic