score:41

Accepted answer

just ran into this myself. you can import createtheme from @mui/material/styles or @mui/system, but they do slightly different things:

you can use the utility coming from the @mui/system package, or if you are using @mui/material, you can import it from @mui/material/styles. the difference is in the default theme that is used (if no theme is available in the react context).

the one from @mui/material/styles is smart enough to fill in gaps in the active theme from the default mui theme. so if you're using @mui/material, then use @mui/material/styles.


Related Query

More Query from same tag