Ccodemod-com-bot

react-19-remove-memoization

Remove manual React memoization calls for React Compiler adoption

ReactmemoizationReact Compiler
Public
33 executions

Run locally

npx codemod react-19-remove-memoization

react-19-remove-memoization

Remove manual React memoization calls: useCallback(...), useMemo(...), and memo(...).

This codemod is intended for React Compiler adoption and mirrors react/19/remove-memoization from codemod/commons.

This is not a universally safe codemod. React Compiler is not a 1:1 replacement for every manual useMemo, useCallback, or memo occurrence, so some memoization may need to be kept to preserve semantics.

Usage

bash

Example

Before

tsx

After

tsx

Ready to contribute?

Build your own codemod and share it with the community.