I am using Material UI version 5.2.7. When I import makeStyles from @mui/materials/styles, I am getting the following error -
Uncaught Error: MUI: makeStyles is no longer exported from @mui/material/styles. You have to import it from @mui/styles. See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.
It also says that @mui/styles is deprecated in Material UI version 5. So I am confused about how I can import makeStyles. Does anyone have any idea about this?
As you can see in documentation, using makeStyles is deprecated now in Material UI as a concept, because they do not want to use JSS anymore, instead they suggest using emotion/react library or styled components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With