December 22, 2018
When you need to return more than one element you have few solutions.
<div>
<span>1</span>
<span>2</span>
</div>
function List() {
return [<span key='1'>1</span>, <span key='2'>2</span>]
}
<Fragment>
<span>1</span>
<span>2</span>
</Fragment>
<>
<span>1</span>
<span>2</span>
</>