Answer the question
In order to leave comments, you need to log in
How to get an array of elements with the same ref attribute?
I have multiple DOM elements with the same ref. If you use the usual React.createRef() function, then this.myRef.current will return the last of the elements. Is there any way to return an entire array of elements, like document.querySelectorAll does?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question