How to make child as props in For loop?

This is the way I come up. But is this right? I want to know most general pattern... I know there is props.children. But I don't see any example in 'For' loop. I want to use For's index.
3 Replies
lxsmnsyc
lxsmnsyc2y ago
that should be fine, but you should probably wrap p.child call in memo or fragment
musiclover
musiclover2y ago
Hmm why? it will be re-rendered always if not ?
lxsmnsyc
lxsmnsyc2y ago
it won't, because For callbacks only run once
Want results from more Discord servers?
Add your server