How to use multiple refs for an array of elements with hooks?

Posted by Prem Tiwari | Updated on

Want to use multiple refs for an array of elements with hooks? A ref is initially just { current: null } object. useRef keeps the reference to this object between component renders. current value is primarily intended for component refs but can hold anything.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers