You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Specific example of Button MUI component has:
Instead of much simpler:
The text was updated successfully, but these errors were encountered:
croraf
changed the title
[several components] replace withStyles HOC to useStyles in internal component implementation
[several components] replace "withStyles" with "useStyles" in internal component implementations
Oct 1, 2019
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 inreact-devtools
. I suggest to switch to the equivalentuseStyles
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:
The text was updated successfully, but these errors were encountered: