I 'm working on a react typescript app and i try to import makeStyles from '@material-ui/core/styles' and it gets me error Attempted import error: 'makeStyles' is not exported from '@material-ui/core/styles'.
i installed these :
npm install @material-ui/core @material-ui/icons @types/material-ui
This is how i solved it
npm install @mui/styles
import { makeStyles } from '@mui/styles';
I recently encountered this problem. This problem occurs when using the latest versions of Material UI. To solve you have to import makeStyles otherwise:
Old version : import { makeStyles } from '@material-ui/core'
New version : import { makeStyles } from '@material-ui/styles';
For more informations : https://next.material-ui.com/guides/migration-v4/
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