React places the supplied initialValue in ref.current on the first render. On later renders, useRef returns the same ref object and ignores newly evaluated initialValue arguments.