React 19 retired forwardRef. Refs are now a normal prop. The wrapper that survived for nine years finally became unnecessary.
What changed
Before React 19, function components couldn't receive a ref directly — refs were special, attached by React's reconciler to DOM elements and class instances. To let a parent get a ref to your inner DOM node, you had to wrap the function in forwardRef(function MyInput(props, ref) { ... }). The wrapper made the second argument the ref.
React 19 made ref a regular prop. Type it, destructure it, forward it. The forwardRef helper still works (for compatibility) but new code shouldn't reach for it.
Three places refs matter
- DOM node access — focus an input, measure an element, scroll into view.
- Imperative APIs — third-party libraries that need you to call methods on an element.
- Storing mutable values —
useRef({ current: ... })as a render-stable mutable box. Lesson 3 of Track 3 covers this one.
This lesson is about the first two — refs that travel across the component boundary.
The new shape
The ref prop carries a React.Ref<T> where T is the underlying element type. Most of the time you just spread or assign it onto the inner element and you're done. If you need to expose imperative methods (an open() on a dialog, a focus() on a complex input), use useImperativeHandle with the ref.
The forwardRef migration
If you're maintaining a codebase that uses forwardRef, you don't have to migrate everything at once. Both styles work. The new code you write should use the prop directly; old code can stay until it's touched for other reasons.