Sets a value on a React ref, handling both callback refs and ref objects. Returns a cleanup function if the ref is a callback ref.
Sets a value on a React ref, handling both callback refs and ref objects. Returns a cleanup function if the ref is a callback ref.