How to use MUI v5 makeStyles without ThemeProvider?
Solution 1:
See this answer for more detail. In short, makesStyles
/withStyles
is not the first class APIs in MUI v5 anymore and is scheduled to be removed in v6. If you use the old API, you have to add a theme yourself.
In v4 you can import makeStyles
from @material-ui/core/styles
without having to supply a custom theme. You can do the same in v5 but only with the new styled
API that is being used by all of the MUI components internally.