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] Classes to hooks #17061

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Aug 19, 2019

Not important internal refactorization.

  • Replace as many usages of React.Component as possible. I doubt React will remove the API before 2-3 years, if they ever do. However, better be 100% on the hooks, when possible.
  • Replace all the usage of the withTheme option. By using useTheme, we ease the future integration with styled-components, emotions, react-jss, linaria. I had to update a few tests that were relying on the internal theme prop, better use the public API in the tests :).
  • Replace static imports of breakpoint keys. It's a small step toward supporting dynamic breakpoints names.

@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Aug 19, 2019
@mui-pr-bot
Copy link

mui-pr-bot commented Aug 19, 2019

Details of bundle changes.

Comparing: c20b046...81b9b7b

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% -0.11% 329,463 329,463 90,110 90,013
@material-ui/core/Paper 0.00% 0.00% 68,843 68,843 20,523 20,523
@material-ui/core/Paper.esm 0.00% -0.01% 62,217 62,217 19,249 19,247
@material-ui/core/Popper 0.00% 0.00% 28,468 28,468 10,177 10,177
@material-ui/core/Textarea 0.00% +0.09% 🔺 5,094 5,094 2,135 2,137
@material-ui/core/TrapFocus 0.00% 0.00% 3,834 3,834 1,614 1,614
@material-ui/core/styles/createMuiTheme 0.00% +0.05% 🔺 16,386 16,386 5,826 5,829
@material-ui/core/useMediaQuery 0.00% -0.09% 2,541 2,541 1,059 1,058
@material-ui/lab -0.03% -0.07% 153,319 153,279 46,757 46,724
@material-ui/styles 0.00% -0.01% 51,561 51,561 15,339 15,338
@material-ui/system 0.00% +0.02% 🔺 15,658 15,658 4,360 4,361
Button 0.00% +0.01% 🔺 78,847 78,847 24,093 24,096
Modal 0.00% -0.02% 14,346 14,346 5,011 5,010
Portal 0.00% +0.08% 🔺 2,907 2,907 1,318 1,319
Rating 0.00% -0.05% 70,314 70,314 21,984 21,973
Slider 0.00% -0.02% 74,539 74,539 23,108 23,104
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing +0.01% 🔺 -0.05% 53,507 53,510 13,862 13,855
docs.main -0.34% -0.24% 599,308 597,251 191,210 190,746
packages/material-ui/build/umd/material-ui.production.min.js -0.03% -0.06% 300,454 300,367 86,491 86,440

Generated by 🚫 dangerJS against 81b9b7b

@oliviertassinari oliviertassinari force-pushed the classes-to-hooks branch 2 times, most recently from d36ea67 to f55084d Compare August 20, 2019 10:54
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.

3 participants