how to repeat a component multiple times react code example Example: react repeat [...Array(n)].map((el, index) => <p key={index}>Item</p>)