useRef

The useRef hook allows you to persist values between renders without causing a re-render.

Snippet:

const ref = useRef(initialValue);

Example:

const inputRef = useRef(null);