The official Lightning Developers Guide recommends using CSS to toggle markup visibility. However, Sara Morgan Nettles suggests the best method might be to use the built-in aura:if component.
Sara explains that Christophe Coenraets’ method for using aura:if results in performance warning messages in your console output. Her simple fix when following the aura:if approach is to add a second attribute called isError.
As Lightning design patterns and best practices emerge, understanding the rendering lifecycle of Lightning Components will enable developers to build high-performing components and applications.
- Source: Sara Has No Limits
- Author: Sara Morgan
- Date: 30-May-2017
- Category: Lightning User Experience and User Interface Patterns