When a component unmounts, React automatically sets its refs to null. This happens as part of React's internal cleanup. However, if you've stored a ref value elsewhere (like in a closure or parent component), that reference might still exist and should be properly handled to prevent memory leaks or attempts to interact with unmounted components.