Add sophisticated presentation logic to your Lightning web component template files, and remove extra code from your component implementation. A component that renders a user interface can now use complex JavaScript expressions directly in its HTML template file. Use complex template expressions anywhere you use basic properties.
Where: This change applies to Lightning web components in Lightning Experience, Experience Builder sites, and all versions of the mobile app in all editions.
Why: One superpower of Lightning Web Components is the templating system, which uses the virtual DOM to render components intelligently and efficiently. Complex template expressions extends this capability to include a comprehensive subset of JavaScript expressions, enabling more dynamic and expressive templates while maintaining your components' performance characteristics and security model.
How: Complex template expressions can be used anywhere basic properties could previously
be used. You must set the apiVersion of your component to 66.0 or later to
enable complex template expressions for that component.
For documentation and examples, see Template Expressions the Lightning Web Components Developer Guide.