Activity › Forums › Salesforce® Discussions › what is the use of aura:renderIf in lightning components?

  • what is the use of aura:renderIf in lightning components?

    Posted by Nikita on October 16, 2019 at 2:08 PM

    what is the use of aura:renderIf in lightning components?

    Piyush replied 7 years ago 2 Members · 1 Reply
  • 1 Reply
  • Piyush

    Member
    October 17, 2019 at 5:17 AM

    Hi Nikita,

    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.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos