• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in React JS by
Q:

What is the use of refs?

1 Answer

0 votes
by

The ref is used to return a reference to the element. They should be avoided in most cases, however, they can be useful when you need a direct access to the DOM element or an instance of a component.

Related questions

0 votes
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
...