React
React useRef HookReact useRef Hook
The useRef Hook holds data that doesn't trigger re-renders.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
The `useRef` Hook is like a secret pocket. It stores data that persists between renders, but unlike `useState`, updating it does not force the component to redraw. Developers also use it to grab direct references to HTML elements.
Example
Example
Key Points
- It returns an object with a `.current` property.
- Changing `.current` does not re-render the component.
- It provides direct access to HTML DOM nodes.
- It is perfect for managing timers or focusing inputs.