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

[material-ui][mui-system] Refactor types so they're compatible with upcoming React 19 #43276

Merged
merged 32 commits into from
Aug 13, 2024

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Aug 12, 2024

Part of #42824

This PR takes out most of the type changes from #42824. The only changes we cannot take out are:

  • Replacing MutableRefObject with RefObject (for example, this one). We cannot change this as RefObject is immutable in React 18 and prior, so it would introduce an immutable type in v5 that wasn't there before.
  • This change as ref is not passed as a prop in React 18

Here are codesandboxes to check that the useRef types are indeed compatible:

@DiegoAndai DiegoAndai added package: system Specific to @mui/system package: material-ui Specific to @mui/material React 19 support PRs required to support React 19 labels Aug 12, 2024
@DiegoAndai DiegoAndai self-assigned this Aug 12, 2024
@mui-bot
Copy link

mui-bot commented Aug 12, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 0254d0a

@DiegoAndai DiegoAndai force-pushed the react-19-compatibility-types branch 2 times, most recently from 8accaca to 869ff4c Compare August 12, 2024 21:01
Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: material-ui Specific to @mui/material package: system Specific to @mui/system React 19 support PRs required to support React 19
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants