-
-
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
skipSx should update shouldForwardProps #31019
Comments
@mnajdova correct me if I'm wrong, but I think it works as it's supposed to. If you don't want to ignore the |
Hi @michaldudak shouldForwardProp: (prop) => !["isEven"].includes(prop as string),
skipSx: true this should not apply the |
This is expected. In this example the |
That's okay, I know it prevents the Anyway, I post it as a feature request, not a bug, and the discussion was exactly what I was looking for. |
After reading trough it I think it makes sense for the |
It would be a breaking change, though, so we could think about it for the v6 release. |
Duplicates
Latest version
Summary 💡
The
skipSx
doesn't work as expected whenshouldForwardProp
default mechanism is overwritten and does not include'sx'
directlyThis will send
sx
to the underlying componentExamples 🌈
I made a code sandbox using the latest released material
https://codesandbox.io/s/goofy-phoebe-xc99x
Motivation 🔦
making a custom component that only changes in CSS layer duo to props is a common practice
also, sx seems to be a little bit slow, and skipping it may gain some performance tips
so because we are working mostly with the Mui component and they pass the props to the underling dom node, it makes sense to have it as a core feature of the material
I seared on
skipSx
tags in the issue list and could not find an open issue, so posted a new one.The text was updated successfully, but these errors were encountered: