Mastering useRef
useRef returns a mutable ref object whose .current property is persisted across re-renders. Use it to access DOM elements directly or store values that don't trigger re-renders.
React JS 0 to Hero: The Complete Guide
useRef returns a mutable ref object whose .current property is persisted across re-renders. Use it to access DOM elements directly or store values that don't trigger re-renders.