React 19+ · Type Alias
ElementRef
Use a ref to access a DOM node managed by React. This is useful for imperative actions such as focusing, scrolling, or measuring an element.
Last updated
Syntax
const ref = useRef(null);
<div ref={ref} />In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
useRefrefcurrentDOM node