I would like to print the <Icon /> for 700 times on the same page. I'm new to NextJs. I use for loop to make it, and able to console.log, but I don't know how to print it. Anyone could help me? Appreciate it much.
Here my code is.
import React from 'react'
import { IoMdWoman } from 'react-icons/io'
const Icon = <IoMdWoman size={40} color='#E91E63' />
for (let i = 0; i < 700; i++) {
console.log(Icon)
}
const test700 = () => {
return (
<ul>
<li>{Icon}</li>
</ul>
)
}
export default test700
return new Array(700).map(_=> <ul> <li>{Icon}</li> </ul> ). use this as return value in your test700 function<li>s, not 700<ul>s, if next.js uses jsx like react does...<ul>tag can be moved out of loop