Skip to content

Custom theme breaks on 4.0.0-alpha.7 #15300

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

Closed
pheuter opened this issue Apr 10, 2019 · 2 comments
Closed

Custom theme breaks on 4.0.0-alpha.7 #15300

pheuter opened this issue Apr 10, 2019 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@pheuter
Copy link
Contributor

pheuter commented Apr 10, 2019

Expected Behavior 🤔

Custom theme should load fine as it did before on 4.0.0-alpha.6:

const theme = createMuiTheme({...});

return (
  <StylesProvider generateClassName={generateClassName}>
    <ThemeProvider theme={theme}>
      <CssBaseline />
      <div>
        <Nav />
        <main>{this.props.children}</main>
      </div>
    </ThemeProvider>
  </StylesProvider>
);

Current Behavior 😯

SSR styles appear broken, and when the client-app loads all components change to the default material-ui theme.

Steps to Reproduce 🕹

Context 🔦

I'm suspecting this may have something to do with memoizing the theme in the latest update, but not sure.

Your Environment 🌎

  • material-ui/[core|styles] - v4.0.0-alpha.7
  • react - v16.8.6
  • jss - v10.0.0-alpha.16
@oliviertassinari
Copy link
Member

@pheuter Duplicate of #15264?

@pheuter
Copy link
Contributor Author

pheuter commented Apr 10, 2019

@oliviertassinari Could be, I'll close this issue for now until some new information comes up, thanks.

@pheuter pheuter closed this as completed Apr 10, 2019
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed waiting for user information labels Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants