Useref in react
useRef returns a mutable ref object whose .current property persists for the lifetime of the component. It's used to access DOM elements directly or store mutable values that don't trigger re-renders when changed.
Example
const inputRef = useRef(null);
const focusInput = () => inputRef.current.focus();