-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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][private-theming] Fix issues reported by react compiler in mui-private-theming
components
#42619
Conversation
Netlify deploy previewhttps://deploy-preview-42619--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
@@ -52,7 +52,8 @@ function ThemeProvider(props) { | |||
} | |||
|
|||
const theme = React.useMemo(() => { | |||
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme); | |||
const output = | |||
outerTheme === null ? { ...localTheme } : mergeOuterLocalTheme(outerTheme, localTheme); |
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 change fixed
Mutating component props or hook arguments is not allowed. Consider using a local variable insteadeslint(react-compiler/react-compiler)
issue here
mui-private-theming
componentsmui-private-theming
components
mui-private-theming
componentsmui-private-theming
components
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.
Nice!
@aarongarciah feel free to merge PR, I can't merge |
…in `mui-private-theming` components (mui#42619)
…in `mui-private-theming` components (mui#42619)
Part of #42564