hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

Documentation - What Problem Does the Plugin Solve #17

Closed jhoffmcd closed 5 years ago

jhoffmcd commented 5 years ago

Hi! I have added this plugin to my Material UI / Gatsby project (after seeing that the production build looks completely different than during development) and it seems to have fixed my problem (there are intermittent issues still persisting)

I wonder, the documentation is a bit lacking for Material UI and Gatsby in general, so what problem does this plugin actually solve for? What is happening in the prod build that is not allowing Material styling to work out of the box?

The documentation here seems to state you do not need a plugin for Material UI to work with Gatsby, but that does not seem to be the case?

oliviertassinari commented 5 years ago

@jhoffmcd What version of Material-UI are you using? With v4, this plugin handles @material-ui/styles.

jhoffmcd commented 5 years ago

I'm still on v3. I was not aware that @material-ui/styles was a v4 thing. This plugin is geared toward an alpha version of Material UI?

oliviertassinari commented 5 years ago

You have two versions of this plugin one for v3 and one for v4. The v4 version should be rock solid. I can't tell about the v3. I would encourage you to reproduce the setup of the Gatsby example we have on Material-UI side.

jhoffmcd commented 5 years ago

Ah okay, I just checked and it looks like v4 is due out real soon. I'll just update to v4. Would more documentation about this be a welcome PR?

Maybe even some documentation on Gatsby's website -> https://www.gatsbyjs.org/packages/gatsby-plugin-material-ui/

oliviertassinari commented 5 years ago

The documentation on Gatsby website comes from here. It will be updated once the next branch is published under the latest npm tag.

jhoffmcd commented 5 years ago

@oliviertassinari awesome thanks for clarifying, hopefully in the mean time this closed issue can help people out with any questions.

oliviertassinari commented 5 years ago

💯