

The useless useCallback: React performance myths unpacked, with Dominik Dorfmeister
Sep 4, 2025
Dominik Dorfmeister, a software engineer at Sentry and TanStack libraries maintainer, dives into the complexities of React's useCallback and useMemo. He reveals that these hooks often complicate rather than enhance performance. Dominik discusses the promise of the React Compiler and how the 'latest ref' pattern can simplify code. He warns against the overuse of memoization and manual optimizations, sharing tips for effective PR reviews and best practices to boost code readability and maintainability.
AI Snips
Chapters
Transcript
Episode notes
Memoization Loses Value Over Time
- useCallback and useMemo often become useless as codebases evolve and props change, breaking referential stability.
- Dominik finds many uses redundant because surrounding memoization is incomplete or unnecessary.
Memoize Only When Measured And Surgical
- Prefer readable, maintainable code over blanket memoization unless you measured a clear need.
- Apply React.memo and manual memoization only surgically and where you can enforce constraints.
Removing Redundant Callbacks At Sentry
- Dominik removed many useless useCallback instances in Sentry and saw no behavior change.
- He wonders why those callbacks existed at all after refactoring.