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] Support React 19 #42381

Open
6 of 12 tasks
DiegoAndai opened this issue May 24, 2024 · 13 comments
Open
6 of 12 tasks

[core] Support React 19 #42381

DiegoAndai opened this issue May 24, 2024 · 13 comments
Assignees
Labels
core Infrastructure work going on behind the scenes React 19 support PRs required to support React 19 umbrella For grouping multiple issues to provide a holistic view

Comments

@DiegoAndai
Copy link
Member

DiegoAndai commented May 24, 2024

Summary

Tasks:

Bonuses:

Examples

Motivation

Allow users to use packages with React 19 to make the most out of the new features

Search keywords: react 19 support

@DiegoAndai DiegoAndai added umbrella For grouping multiple issues to provide a holistic view core Infrastructure work going on behind the scenes labels May 24, 2024
@DiegoAndai DiegoAndai self-assigned this May 24, 2024
@DiegoAndai DiegoAndai moved this to Selected in Material UI May 24, 2024
@DiegoAndai DiegoAndai moved this from Selected to In progress in Material UI May 24, 2024
@DiegoAndai DiegoAndai added this to the Material UI: v6 milestone May 27, 2024
@DiegoAndai DiegoAndai assigned brijeshb42 and unassigned brijeshb42 Jun 3, 2024
@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 5, 2024

Do we plan to bring React 19 support to Material UI v5? From this issue, I get the impression that it's plan for Material UI v6 only.

I think that we could skip Material UI v5 support, and only do Material UI v6 if all these conditions are met:

  • There are breaking changes needed to support React 19 (so can't happen in Material UI v5) or it's a LOT of work to do twice in v6 and v5 (not worth it).
  • Material UI v6 is an "easy" migration from Material UI v5. If it's not, it would mean that we force developers to go through a painful upgrade path to be able to use React 19. A great UX is to allow developers to upgrade both independently.
  • Material UI v6 is released with React 19 support before or at the same time other libraires release React 19. For example, it's worked on in React 19 compatibility radix-ui/primitives#2934. If the release of Material UI v6 comes many weeks after, it would signal to the community that Material UI is lagging behind. It's not pushing the envelope.
  • MUI X can support React 19 without introducing a new major. [data grid] React 19 support mui-x#13356

@aarongarciah
Copy link
Member

aarongarciah commented Jun 6, 2024

@DiegoAndai I created an issue to adopt the official eslint-plugin-react-compiler. React compiler requires React 19 to work, so it would be nice if we fix most issues (at least in the demos) before React 19 is released.

Do you think it makes sense to include it in this umbrella issue?

edit: #42548 is now part of this umbrella issue.

@DiegoAndai
Copy link
Member Author

Do we plan to bring React 19 support to Material UI v5?

We discussed with the core team, and the plan is as follows:

  • We'll work on React 19 support on the next branch (v6)
  • After the next branch is compatible with React 19, we'll review if it's possible to backport the changes to the master branch (v5) based on the conditions @oliviertassinari mentions in his comment.

To make the backport easier (in case we go for it), we'll try to batch the React 19 changes in bigger PRs.

cc: @aarongarciah

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 10, 2024

@DiegoAndai It sounds great.

The why behind each condition is more important than the conditions themselves, I wanted to highlight the considerations that we likely want to weight with v4.

@fzaninotto
Copy link
Contributor

fzaninotto commented Jun 11, 2024

I know the decision has already been made, but I wanted to give my 2c with the react-admin perspective.

We're adding the finishing touches to our new major version, react-admin v5. We do only one major version every 2 years to avoid bothering our users with useless upgrades, so we make each major count!

We've tested react-admin v5 with React 19 RC, and we only have only 2 problems (we're using Material UI v5):

We would very much like to launch React-admin v5 just after the React 19 stable, to be able to benefit from the new hooks (e.g. use()) in future minor releases. Otherwise we'll have to wait 2 years for that. But that won't be possible if MUI v5 doesn't fix the two issues above or if V6 isn't released in the days following React 19.

I dont't know about the MUI v6 release schedule, but I understand it's not ready for prime time yet. So if you could fix the 2 issues above in v5 first, this would help react-admin (and every other project using MUI v5 and React 19) work almost flawlessly without waiting for V6.

We could even give you a hand if that's an option.

Looking forward to using React 19 with MUI soon!

@DiegoAndai
Copy link
Member Author

DiegoAndai commented Jun 12, 2024

Thanks for reaching out @fzaninotto 🙌🏼

This is a solid argument for backporting the React 19 changes to v5. If we can support React 19 without breaking changes, I see it likely that we will. We'll keep updating this issue with the progress we make.

@fzaninotto
Copy link
Contributor

We ended up releasing react-admin v5 today without requiring React 19 (or MUI 6). We'll need to wait for the next major version to do so. https://github.com/marmelab/react-admin/releases/tag/v5.0.0.

@Zenoo

This comment was marked as resolved.

@cherniavskii
Copy link
Member

We also need Material UI v5 to support React 19 for MUI X.

@DiegoAndai
Copy link
Member Author

@aarongarciah after we figure out the Modal test issue, we should take this out of the v6 milestone. The package bumping should be done as soon as React 19 is stable, so it shouldn't block the v6 stable release.

@aarongarciah
Copy link
Member

@DiegoAndai we decided to modify the Modal test temporarily. See https://github.com/mui/material-ui/pull/42824/files#r1718307022. I'm taking this out of the v6 milestone as there's nothing React 19 related that should delay the v6 release.

@aarongarciah aarongarciah removed this from the Material UI: v6 milestone Aug 15, 2024
@erickbelfy
Copy link

Hey folks, the product that I work with is planning to migrate to react 19 soon, and we also use RA, I see that there’s a lot of good work here going on, I’d like to know if there’s any tasks that I could help you with

@DiegoAndai
Copy link
Member Author

Hey @erickbelfy! Thanks for reaching out. The only thing left at this moment is to implement this fix: #41388 (comment), let me know if you want to take this.

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 umbrella For grouping multiple issues to provide a holistic view
Projects
Status: In progress
Development

No branches or pull requests

8 participants