useRef returns an object with a current property. React returns the same ref object on later renders, and code can update ref.current without using a setter.