-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
duplicateThis issue or pull request already exists.This issue or pull request already exists.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUI
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
One of the main reasons React introduced hooks was to remove the long component tree chains in react-devtools, arising when HOCs are used.
MUI uses withStyles internally which gives rise to much longer component tree chains in react-devtools. I suggest to switch to the equivalent useStyles syntax in internal implementations.
Check: https://codesandbox.io/s/hoc-hook-comparisson-mui-h6oq9
Specific example of Button MUI component has:

Instead of much simpler:

oliviertassinari and adeelibr
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already exists.This issue or pull request already exists.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUI
