Post

Ref Callbacks got an upgrade with React 19, and the presence of the React Compiler has further changed my thinking about using useCallback for those in some situations. tkdodo.eu/blog/ref-cal... Thank you @gsathya.bsky.social for starting the discussion about this 🙇‍♂️

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

13 reposts100 likes

I think the 'focus' was a nice example in the first post. The focus management can get complicated in large apps, especially if logic is managed by a global state. When dealing with the local state, you can solve some/most of it with `flushSync`.