-
-
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
[pigment-css] Fix props forwarding #41688
Conversation
…t/styled-forward-prop
…t/styled-forward-prop
); | ||
const newProps = {}; | ||
// eslint-disable-next-line no-restricted-syntax | ||
for (const key in props) { |
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.
I hope this is comparatively faster than Object.keys
since optimizing this styled
call is the most important part as it'll be called a lot.
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.
I think so, it's the same logic as emotion.
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.
styled-component also do the same.
loader: { | ||
'.js': 'jsx', | ||
}, |
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.
Added this after switching styled.jsx
to styled.js
to make the build work. I can't run the test with .jsx
and there is no .jsx
found the codebase.
Netlify deploy previewhttps://deploy-preview-41688--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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.
All looks good. There is a bundle size increase significantly but it should be fine given the amount of functionality it is adding.
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's great to see this one handled 👌
To unblock #41378
@emotion/is-prop-valid
shouldForwardProp
for root and other slots