javascript render jsx element x many times
const n = 8;
[...Array(n)].map((elementInArray, index) => (
<div className="" key={i}> Whatever needs to be rendered repeatedly </div>
)
)
javascript render jsx element x many times
const n = 8;
[...Array(n)].map((elementInArray, index) => (
<div className="" key={i}> Whatever needs to be rendered repeatedly </div>
)
)
how to render a component multiple times in react
ReactDOM.render(
<>
{ [...Array(8)].map( ( el, i) => ( <App key={i}/> ) ) }
</>,
document.getElementById('root')
);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us