In your broken example, the result will be
[undefined, ...., undefined]
because the JS interpreter understands this (note ;after return)
let cards = this.props.cards.map(
(card) => {
return;
<Card id = {card.id}
title = {card.title}
description = {card.description}
color = {card.color}
tasks = {card.tasks} />
});
if you added a new line after return- the JS interpreter automatically inserts a semicolon, and this is not a problem with JSX
source
share