Skip to content
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

[core] Apply React 19 type changes that don't require upcoming @types/ packages #42346

Merged
merged 5 commits into from
May 24, 2024

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented May 22, 2024

Based on #42032
First step towards #42032

Summary

This PR includes the type changes we can implement without upgrading to the new @types/ packages (which is a WIP). It's achieved by:

  • Running npx types-react-codemod@latest preset-19 but skipping the useRef-required-initial codemod (See missing section below)
  • Running npx types-react-codemod@latest react-element-default-any-props to maintain ReactElement's previous default.

This results in the following changes:

Missing

The following are missing, to be implemented after DefinitelyTyped/DefinitelyTyped#69022 is merged:

@DiegoAndai DiegoAndai added typescript core Infrastructure work going on behind the scenes labels May 22, 2024
@DiegoAndai DiegoAndai self-assigned this May 22, 2024
@mui-bot
Copy link

mui-bot commented May 22, 2024

Netlify deploy preview

https://deploy-preview-42346--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against c8b83ae

@DiegoAndai DiegoAndai changed the title [core] WIP React 19 types [core] Apply React 19 type changes that don't require upcoming @types/ packages May 23, 2024
@DiegoAndai DiegoAndai marked this pull request as ready for review May 23, 2024 16:11
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check all the files but the changes make sense. I agree that we should progressively improve the ReactElement situation.

@DiegoAndai DiegoAndai merged commit 78d723b into mui:next May 24, 2024
22 checks passed
@DiegoAndai DiegoAndai deleted the react-19-types branch May 24, 2024 16:11
@DiegoAndai DiegoAndai added the React 19 support PRs required to support React 19 label Jul 2, 2024
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes React 19 support PRs required to support React 19 typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants