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

When to use the plugin vs. the theme? #50

Closed dandv closed 4 years ago

dandv commented 4 years ago

Thanks @hupe1980 for publishing both. How should new users choose between using this plugin, vs. the theme?

oliviertassinari commented 4 years ago

@dandv It depends on what you want to optimize for. I think that the simplest & fastest is to start with the theme and "eject" to the plugin level if you need more control, but it's only my understanding of the problem.

dandv commented 4 years ago

I want a reliable solution (e.g. no FOUC) that I can start rapidly with. I only want to customize the colors in the palette.

oliviertassinari commented 4 years ago

@dandv Here is a detailed version I'm aware of:

  1. gatsby-plugin-material-ui: solve the FOUC, auto prefix, and minification.
  2. gatsby-theme-material-ui: solve 1. and: loading font, helper to apply theme, styled Link component, meta viewport, css baseline.
hash commented 4 years ago

What will happen if both plugins are used, do they work together? Do they should be used together? Should not be used together?

oliviertassinari commented 4 years ago

The theme already use the plugin internally. I would assume users shouldn't use them together.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

oliviertassinari commented 4 years ago

erin-doyle commented 4 years ago

This would be great info to add to the READMEs of both repos and the Gatsby plugin listings.