Spectrum is now read-only. Learn more about the decision in our official announcement.


⚠️ Our spectrum channel is now disabled, use StackOverflow instead


MuiThemeProvider vs ThemeProvider

February 21, 2019 at 3:31pm
The Material-UI community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

MuiThemeProvider vs ThemeProvider

February 21, 2019 at 3:31pm
Hello. I am a newbie for Material UI. I am wondering what is the best practice to use both theme providers. As I understand, I have to supply a theme to MuiThemeProvider to apply the theme to framework's components like Button, Card, etc. And I have to supply a theme to ThemeProvider in order to have it available when I create custom components
I am doing this in my project
const theme = createMuiTheme({
typography: {
useNextVariants: true
<MuiThemeProvider theme={theme}>
<ThemeProvider theme={theme}>
<App />
Is it correct to pass the same theme object to both providers?

February 21, 2019 at 4:10pm
If I'm not mistaken you either use MuiThemeProvider if you're using the "old" withStyles HOC. If you're using the new makeStyles hook you should use the ThemeProvider. If you're using ThemeProvider don't forget to run install() at the root of your app. So it depends on which theming method you want to use, though there is no harm in passing it to both providers (afaik).
Show more messages