June 21, 2020
Which is preferred option with in callback refs and findDOMNode()?
It is preferred to use callback refs over findDOMNode()
API. Because findDOMNode()
prevents certain improvements in React in the future.
The legacy approach of using findDOMNode
:
The recommended approach is: