I'm looking for the shortest approach to generate multiple JSX element.
For example, if I need to generate 10 <span> I can easily use Array map function
{[...Array(10)].map((x, i) =>
<span key={i} ></span>
)}
There's nothing wrong with the above approach but I want another shorter version like,
Array(10).fill(<span></span>);
However, React will shout about not having the unique 'key' props. does anyone have a clean solution without using the random()?