-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add react 19 codemods and recommend codemod
command
#320
Conversation
h/t @r4zendev @DmytroHryshyn , and @hbjORbj for creating the React 19 codemods. |
Co-authored-by: Benny Joo <[email protected]> Co-authored-by: DmytroHryshyn <[email protected]> Co-authored-by: Sasha <[email protected]>
@acdlite, @rickhanlonii, @gnoff, @eps1lon, could one of you review this please? |
@DmytroHryshyn can you allow edits to the PR? |
Sure, added you to the repo @rickhanlonii |
We do not recommend removing useMemo and use callback while the compiler is still experimental. The compiler may skip components for various reasons (violations of React’s rules, as-yet-unsupported syntax, etc) and a blanket codemod to remove all manual memoization could cause problems. We strongly recommend waiting until the compiler is stable. We plan to provide a script that will only remove manual memoization where the compiler is running, skipping components/hooks where the compiler would bail out. Let’s remove the “remove memoization” code of from the PR - thanks! |
noted. we will remove it soon. thanks for flagging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
README.md
Outdated
|
||
This will start an interactive wizard, and then run the specified transform. | ||
We recommend using the [`codemod`](go.codemod.com/react-codemod) command for improved experience and support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rickhanlonii do you prefer if this link goes to our github, upgrade recipe, all react 19 codemods in registry, or somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a preference, that was what the codemod team added in a previous commit on this PR
codemod
command
Thanks! |
react-codemod
CLITesting
Running with
react-codemod
Running with
codemod