# Ref Callbacks, React 19 and the Compiler

DevFeed: [Ref Callbacks, React 19 and the Compiler](<https://devfeed.tech/articles/ref-callbacks-react-19-and-the-compiler-48226.md>)

Original publisher: [Read original article](<https://tkdodo.eu/blog/ref-callbacks-react-19-and-the-compiler>)

Published: 2024-12-08T00:00:00Z

Content type: article

Language: en

Sources: [TkDodo](<https://devfeed.tech/sources/tkdodo-s-blog.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [callback](<https://devfeed.tech/topics/callback.md>)

Tags: [callback](<https://devfeed.tech/tags/callback.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [performance](<https://devfeed.tech/tags/performance.md>), [react](<https://devfeed.tech/tags/react.md>)

## AI overview

An article revisiting callback refs in React 19, including how the React Compiler changes the author's thinking about useCallback and when callback functions should be moved outside components. It also discusses using refs to interact with DOM nodes and store measurements in React state.

## Source excerpt

Reflecting on useCallback, how the Compiler changed my thinking about it, and what React 19 has in store for Ref Callbacks...