-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[blog] React 19 migration for MUI X #45348
Conversation
Netlify deploy previewhttps://deploy-preview-45348--material-ui.netlify.app/ Bundle size report |
Nice! I haven't reviewed the post yet but I love to see this kind of "behind the scenes" content for the blog! 🙌 |
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.
This is great @arminmeh 🎉 Just made some small suggestions for grammar/readability
Thanks @alelthomas |
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.
Looks nice. I just left comments that are more a matter of taste than recommendation. feel free to ignore :)
We were lucky that we didn't have to change much in the source code, but a lot of changes had to be made to our tests because of the modifications related to [strict mode](https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements) and [error reporting](https://react.dev/blog/2024/04/25/react-19-upgrade-guide#errors-in-render-are-not-re-thrown). | ||
These changes caused a different call count for our spies and different console outputs, so we had to expect different values based on the React major. | ||
|
||
`@mui/internal-test-utils` provides an export `reactMajor` that extracts the major version of the React version used in the test. |
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.
The goal is not to encourage them to use our internal-test-utils
but to rewrite their own
`@mui/internal-test-utils` provides an export `reactMajor` that extracts the major version of the React version used in the test. | |
:::info | |
To know which version of React is running, they provide a nice helper | |
```js | |
import * as React from 'react'; | |
const reactMajor = parseInt(React.version, 10); | |
``` | |
::: |
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.
Not sure if we need the actual snippet 🤔
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.
Suggestions for title, description, and intro—I'll come back to review the rest tomorrow.
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.
Great initiative!
Added my five cents below 🙂
a3d147d
to
2ca669b
Compare
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.
Two tiny style suggestions, otherwise I think this is ready to publish. Great job @arminmeh !
Co-authored-by: Ale <[email protected]> Signed-off-by: Armin Mehinovic <[email protected]>
2c4e1c2
to
7f0f735
Compare
Preview https://deploy-preview-45348--material-ui.netlify.app/blog/react-19-update/