const n = 8;
{[...Array(n)].map((elementInArray, index) => (
<div className="" key={index}> Whatever needs to be rendered repeatedly... </div>
)
)}
<div>
{items.map((item,index) => <ObjectRow key={index} name={item} />)}
</div>
{data.map(el => {
return (
<div>
<p>{el.content}</p>
</div>
)
})}
function Example(num){
const output = new Array();
for(let i = 0; i< num ; i++){
output.push(<Component />)
}
return output;
}
return(
{get_comments(this.props.comments)}
)
const n = 8;
{[...Array(n)].map((elementInArray, index) => (
<div className="" key={index}> Whatever needs to be rendered repeatedly... </div>
)
)}