Practice
You can simply use Array.prototype.map with ES6 arrow function syntax. For example, an items array of objects is mapped into an array of components:
{items.map(item => )}
You cannot iterate using a for loop:
for (let i = 0; i }
This is because JSX tags are transformed into function calls, and you cannot use statements inside expressions. This may change thanks to do expressions, which are a stage 1 proposal
Comments