i used it and it worked , i used in my project where i have created a dowload button which download a portion of an html element as image, i have to provide the reference to all the HTML elements separately , so i used this method and it worked ,all the elements got separate reference and download button is working fine for all the Elements.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can you provide a example of using it inside a function like passing refs and how to handle it inside a function?
I don't know how you'd do that, I haven't used useRef since I wrote this article.
i used it and it worked , i used in my project where i have created a dowload button which download a portion of an html element as image, i have to provide the reference to all the HTML elements separately , so i used this method and it worked ,all the elements got separate reference and download button is working fine for all the Elements.