-
-
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
[Hidden] Remove dependency on hoist-non-react-statics #33015
[Hidden] Remove dependency on hoist-non-react-statics #33015
Conversation
Off-topic. Our bundle size tracker looks broken. Why is the change not reported in the @mui-bot's comment? If the same problem also happens when the bundle size increases, then it feels critical. I also think that it starts to be important for MUI X to have this mui/mui-x#5550, so we can start to optimize bundle size for the data grid and date picker. The data grid is as big as Material UI: https://bundlephobia.com/package/@mui/x-data-grid@5.12.0 |
@@ -108,8 +107,6 @@ const withWidth = | |||
WithWidth.displayName = `WithWidth(${getDisplayName(Component)})`; | |||
} | |||
|
|||
hoistNonReactStatics(WithWidth, Component); |
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.
For context, Component
can only be Hidden internal components, so this line is useless.
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 fewer dependencies, the better!
Haha, yes 😍. AG Grid pushes it too far though https://www.npmjs.com/package/ag-grid-community no? 😅 Oh, the non-MIT license was not ISC but BSD in the Core. ISC is the weird license that MUI X Pro depends on (that we are phasing out). |
Definitely :)
AFAIK both BSD and ISC are OK to use in our context (ISC being even more permissive): https://tldrlegal.com/license/-isc-license, https://tldrlegal.com/license/bsd-3-clause-license-(revised) |
@michaldudak Agree, the only downside is that it's one more license that developers have to check (what you did). Now, it's only a minor detail. |
The API was removed in #26136 but we forgot to remove this dead logic. I found it thanks to https://npm.anvaka.com/#/view/2d/%2540mui%252Fmaterial, one of the few licenses that is not MIT:
I think that all-in on MIT makes it easier for adoption. Fewer licenses to get approval on in corporations.