Sara Has No Limits: Lightning Best Practice – Conditional Rendering

Comparing Strategies for the Conditional Rendering of Lightning Components

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.