Closed adaladam closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/react-component/motion/7ayBZSRyD1tmM6frooKc9FpyRo3Z
✅ Preview: https://motion-git-fork-adaladam-master-react-component.vercel.app
@adaladam @afc163 just wondering if there is something stopping merge this PR. Thanks!
We need a new release with this pr.
When the ref is passed explicitly to dom element it is not necessary to call the deprecated findDOMNode. In such cases we could directly return the ref.
In example below when the ref is passed explicitly we can internally store it and return the ref's value immediately to get HTMLElement, no need to call findDOMNode here. `
`
findDOMNode is called when there is no ref assigned and it is the only way to get the node like in the code example below. `
`
findDOMNode is also called when the child element is react class component which is not forwarding it's ref down to html element. `
`