Activity Forums Salesforce® Discussions What are the different ways to conditionally display markup, the preferred approach in salesforce?

  • What are the different ways to conditionally display markup, the preferred approach in salesforce?

    Posted by Piyush on October 14, 2019 at 4:50 am

    What are the different ways to conditionally display markup, and what is the preferred approach in salesforce?

    Saddam replied 5 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Yogesh

    Member
    October 14, 2019 at 5:47 am

    Hello,

    Using the <aura:if> tag is the preferred approach to conditionally display markup but there are alternatives. Consider the performance cost and code maintainability when you design components. The best design choice depends on your use case.

     

  • Saddam

    Member
    October 14, 2019 at 6:24 am

    Hi,

    Using the <aura:if> tag
    Use CSS to toggle visibility of markup by calling $A.util.toggleClass(cmp, ‘class’) in JavaScript code

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos