← React Intermediate Questions - Set 7 Q61

What is the `useRef` hook used for in React?

React Intermediate Questions - Set 7

Example

const n = useRef(0); n.current += 1;   // no re-render
const el = useRef(null); el.current.focus();

What to notice

← Back to the question list