-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Add React 19 as peer dependency #43216
Conversation
Netlify deploy previewhttps://deploy-preview-43216--material-ui.netlify.app/ Bundle size report |
edit: I removed the peer dependency from Joy UI and Base UI. @mnajdova @DiegoAndai I need to test more components/hooks to see if users can run into TypeScript errors while using React 19. Since we still haven't merged type updates required for React 19 (we can't merge them until they're stable), there's a change some users import some component with incompatible types. Not so many TS changes are required in the React PR. I'll review them to see if some public types (the ones we ship in .d.ts files) can break consumers' apps.
|
BTW, not sure we should be updating Base UI peer deps anymore. Thoughts? |
I agree we shouldn't, we could skip Joy as well IMO 🤔 |
199c173
to
54ca0b9
Compare
Hey @Janpot, do you know if there's a way to circumvent the error described in this PR description while installing dependencies with |
Doesn't look like I guess the only way (apart from forcing it) will be to wait for a stable release. |
Weird that |
🤔 It seemed to me that the problem was that it doesn't satisfies emotion peer dependency range. I don't think we can fix that in our packages. |
2a23681
to
54ca0b9
Compare
Just tested with a I'm testing all possible range syntaxes and I don't quite understand how npm resolves ranges: |
My thinking is other dependencies depending on |
As soon as React releases a stable 19 version, it will satisfy the emotion peer dependency range and this error should disappear. If people want to play around with prereleases, they can just use the |
@Janpot yes, I think we don't have a choice 👍 |
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.
🚢 it.
Btw, we could update the installation docs once React 19 is stable with a note for the Emotion peer dependency & version compatibility problem.
Includes v19 in React peer dependencies definitions.
How to test?
npm i
npm start
npm run build
Follow the same steps with other package managers like
pnpm
andyarn
.Findings:
npm
(teted in Node v18 and v20) results in an error with an@emotion/react
peer dep. To overcome the error, you need to use the--force
flag (--legacy-peer-deps
doesn't work).pnpm
andyarn
(v1) seem to work well