#How can i add refs dynamically in react without having ts explode
4 messages · Page 1 of 1 (latest)
Yeah it is because an assignment statement returns the value that was assigned
And the ref function shouldn't return anything
<div ref={(el) => {
refs.current[i] = el
}}>
test
</div>
dang bro you a realk one g