-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
makeStyles not found since v5.0.0-alpha.35 #27216
Comments
This may be relevant too #20012 |
Should we add these modules back in v5, with an explicit error for those that try to call them? import MuiError from '@material-ui/utils/macros/MuiError.macro';
throw new MuiError([
'Material-UI: x is not longer exported from @material-ui/core.',
'You have to import it from @material-ui/styles.',
'See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more details.',
].join('\n')); This will help the busy developers that don't have the time to read in detail the migration guide. With the link, they would find the codemod. |
This comment has been minimized.
This comment has been minimized.
Let’s do it! |
@jrhager84. Did you install |
I did eventually, but the documentation is extremely nebulous about the requirements. I'm trying to find where it said, but it basically said it was broken out of /core, and unless you plan on using the themes outsides of Mui, to install the /styles package. I'll try to dig up where I saw it. I can't immediately find it presently. |
It is here were the warning specifies to install const useStyles = makeStyles(theme => {
console.log(theme) // {}
return {...}
}) Installing @material-ui/styles@v5.0.0 solved the issue for me. |
Thank god I found this. I didn't realize there was a new version of @material-ui/styles for v5.0.0. Maybe you should make this more clear in the migration guide? |
@mnajdova Maybe we shouldn't wait for a community member to take on this issue and implement #27216 (comment) now? |
Lost on an hour on this one 😅 Suggested documentation improvements related to the issue, on page https://next.material-ui.com/styles/basics/#installation
|
@jtgi Thanks for the extra feedback. It does seem that we have more improvements opportunities, 👍 for these 3 points. |
This is the place I was referring to. It made it seem as though if you were using MUI, you wouldn't have to install the styles module, as you'd only have to do that if you were only using the styling. |
Using |
makeStyles not found since v5.0.0-alpha.35 and no clarity on any migration strategy, the whole code base is filled with makeStyles and unsure of how to migrate them to beta, any pointers?
The text was updated successfully, but these errors were encountered: