Skip to content
masterclass Buddy

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.

Subscribe
  • useRef
  • ref
  • current
  • DOM node

Source: Manipulating the DOM with Refs – React. Checked 2026-11-03.