Quick Answer: Should We Use REF IN React?

Should I use refs in react?

It is a general rule of thumb to avoid using refs unless you absolutely have to.

The official React documentation outlined only three possible use cases where refs are entirely considered useful for lack of better alternatives: Managing focus, text selection, or media playback.

Triggering imperative animations..

How do you pass REF IN react?

React will pass the ref through and forward it down to