using react.useRef with a dynamic elements list. is this a bad practice?

rowej83
CodeSandbox
React useRef with dynamic lists - CodeSandbox
React useRef with dynamic lists by rowej83 using randomcolor, react, react-dom, react-scripts
2 Replies
shaaah
shaaah3y ago
Nope, looks fine to me. Instead of bind , use: onClick={()=>changeColor(index)}
venego
venegoOP3y ago
I will, thanks
Want results from more Discord servers?
Add your server