Loading
×Sorry to interrupt
CSS Error
Aura Component

Render If

  • Deprecated. Use aura:if instead. This component allows you to conditionally render its contents. It renders its body only if isTrue evaluates to true. The else attribute allows you to render an alternative when isTrue evaluates to false.

    Descriptor

    aura:renderIf

    Targets

    Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out / Visualforce, Standalone Lightning App

The expression in isTrue is re-evaluated every time any value used in the expression changes. When the results of the expression change, it triggers a re-rendering of the component. Use aura:renderIf if you expect to show the components for both the true and false states, and it would require a server round trip to instantiate the components that aren't initially rendered. Switching condition unrenders current branch and renders the other. Otherwise, use aura:if instead if you want to instantiate the components in either its body or the else attribute, but not both.

<aura:component> <aura:renderIf isTrue="{!v.truthy}"> True <aura:set attribute="else"> False </aura:set> </aura:renderIf> </aura:component>
Documentation
Specification