What is refs in ReactJS? When might you use refs?

The ref is used to return a reference to your element. Refs should be avoided in most cases but they can be useful when you need DOM measurements or to add methods to your components.

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.