<aura:iteration> – multiple items set

If you see the following warning message in the browser console, this occurs if your component sets the items attribute of an <aura:iteration> tag multiple times in the same rendering cycle:

"WARNING: [Performance degradation] markup://aura:iteration [id:5:0] in c:iterationMultipleItemsSet ["3:0"] had multiple items set in the same Aura cycle" 

The following code shows how <indexentry content="events strategy: tag"> you can generate performance degradation when using aura:iteration.

<!--c:iterationMultipleItemsSet--><aura:component>    <aura:attribute name="sports" type="List"                   default="[ 'Cricket', 'Tennis', 'Football' ]"/>        <aura:handler name="init" value="{!this}" action="{!c.init}"/> <aura:iteration ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.