Skip to content
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

[core] Remove all .defaultProps usages #16542

Merged

Conversation

joshwooding
Copy link
Member

Why not? Finishes a section of #15231

@mui-pr-bot
Copy link

mui-pr-bot commented Jul 9, 2019

@material-ui/core: parsed: +0.13% , gzip: +0.07%

Details of bundle changes.

Comparing: 86de525...fd024b2

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core +0.13% 🔺 +0.07% 🔺 327,440 327,857 90,326 90,388
@material-ui/core/Paper +0.06% 🔺 +0.06% 🔺 68,438 68,478 20,394 20,407
@material-ui/core/Paper.esm +0.06% 🔺 +0.06% 🔺 61,721 61,761 19,178 19,190
@material-ui/core/Popper 0.00% 0.00% 28,942 28,942 10,407 10,407
@material-ui/core/Textarea 0.00% 0.00% 5,505 5,505 2,365 2,365
@material-ui/core/TrapFocus 0.00% 0.00% 3,753 3,753 1,576 1,576
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,160 16,160 5,813 5,813
@material-ui/core/useMediaQuery 0.00% 0.00% 2,595 2,595 1,104 1,104
@material-ui/lab +0.05% 🔺 +0.07% 🔺 138,023 138,091 42,537 42,566
@material-ui/styles +0.08% 🔺 +0.08% 🔺 51,847 51,887 15,371 15,384
@material-ui/system 0.00% 0.00% 15,576 15,576 4,433 4,433
Button +0.05% 🔺 +0.04% 🔺 81,121 81,161 24,768 24,779
Modal 0.00% 0.00% 14,514 14,514 5,094 5,094
Portal 0.00% 0.00% 3,471 3,471 1,573 1,573
Slider +0.05% 🔺 +0.04% 🔺 75,123 75,163 23,304 23,313
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing 0.00% 0.00% 54,338 54,338 13,762 13,762
docs.main +0.06% 🔺 +0.08% 🔺 647,952 648,353 204,174 204,341
packages/material-ui/build/umd/material-ui.production.min.js +0.12% 🔺 +0.14% 🔺 299,853 300,226 85,939 86,063

Generated by 🚫 dangerJS against fd024b2

@joshwooding joshwooding mentioned this pull request Jul 9, 2019
29 tasks
@joshwooding joshwooding changed the title Get rid of all .defaultProps usages Remove all .defaultProps usages Jul 9, 2019
@joshwooding joshwooding changed the title Remove all .defaultProps usages [core] Remove all .defaultProps usages Jul 9, 2019
@oliviertassinari oliviertassinari merged commit c536428 into mui:master Jul 10, 2019
@Izhaki
Copy link
Contributor

Izhaki commented Oct 2, 2019

Why were .defaultProps removed?

There are quite a few issues/commits related to this, but I couldn't find in any the reason for this (react-docgen? Functional components?). Can anyone explain, or link to the explanation?

@joshwooding joshwooding deleted the be-the-change-you-wish-to-see branch October 2, 2019 20:51
@oliviertassinari
Copy link
Member

@Izhaki 1. Simpler 2. React talks about potential removal 3. required for getThemeProps() usage.

@joshwooding
Copy link
Member Author

Why were .defaultProps removed?

There are quite a few issues/commits related to this, but I couldn't find in any the reason for this (react-docgen? Functional components?). Can anyone explain, or link to the explanation?

https://twitter.com/dan_abramov/status/1133878326358171650?lang=en

https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md

@zannager zannager added the core Infrastructure work going on behind the scenes label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants