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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Material UI v4: add support for React 18 #32685
Comments
React 18 is supported from MUI Core v5.6.0, MUI X v5.9.0 and upward. |
Any tips on migrating to v5? because in the guide it says to update react first and make sure everything works. But I can't do that because everything does not work after I update react. |
@MartinHelvig Please have a look at #35232. Is it clearer? |
@oliviertassinari yeah thanks, I also noticed it has the @mui/styles in the update package section, which is not supported anymore I think. |
We want developers to not have to create one big PR, one that would block the development for the rest of their team and one that is more likely to break production. |
Ah okey, but @mui/styles does not support react 18, so kinda hard anyway. |
@MartinHelvig Correct, you would first need to upgrade to React 17, migrate to https://github.com/garronej/tss-react, and then React 18. But honestly, I don't see the urge to use React 18. I haven't seen strong completing use cases for its new features yet. |
You might be right about that, just having some other packages dependent on react 18. But I appreciate your comments, helps me alot. |
So far MUI v4 works completely fine on React 18 (without StrictMode). Is there anything I should be aware of? We cannot easily upgrade to MUI v5 but were kind of forced to do the React 18 upgrade now as a lot of other packages started to become incompatible with React 17, for example React Testing Library. |
@levrik it's mostly ok. There are a few bugs around effect behavior changes, but if it's a legacy project, I think it's OK. |
@oliviertassinari It's our main product which is actively being developed. We're looking into upgrading to MUI v5 but the React upgrade couldn't wait now. We didn't observe any issues within our application so far, so I guess it's okay for now. |
@levrik so react 18 works normally with mui 4? |
@Rabinzon It seemed so, we shipped it to production and received complaints from customers a few hours later. Reverted. |
The best solution is just to update all packages, use chatGPT to get help on problems u might have. |
Duplicates
Latest version
Current behavior 馃槸
The latest version of
@material-ui/core
(v4.12.4) does not support React 18.Expected behavior 馃
support version for react 18
Steps to reproduce 馃暪
Steps:
Context 馃敠
No response
Your environment 馃寧
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: