In some component when I use ref callback to receive component's ref, the argument of callback is null. When and in what situations the argument will be null?
React will call the ref callback with the DOM element when the component mounts, and call it with
null
when it unmounts.
https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With