Skip to content
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

Material UI V5 support? #70

Closed
ZLevine opened this issue May 11, 2021 · 12 comments
Closed

Material UI V5 support? #70

ZLevine opened this issue May 11, 2021 · 12 comments

Comments

@ZLevine
Copy link

ZLevine commented May 11, 2021

Does this plugin work with Material UI V5 (alpha)? The docs only reference V3 and V4. Thanks!

@oliviertassinari

This comment has been minimized.

@ZLevine
Copy link
Author

ZLevine commented Jun 8, 2021

How so? I presume an MUI plugin would still be useful as it would abstract away a lot of things like server side stylesheets, ThemeProvider, etc.

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Jun 13, 2021

abstract away a lot of things like server side stylesheets, ThemeProvider, etc.

@ZLevine Gatsby uses the notion of "theme" for the solution you are interested in. See https://github.com/hupe1980/gatsby-theme-material-ui.

@ZLevine
Copy link
Author

ZLevine commented Jun 15, 2021

Ah thanks, I didn't know there was a Gatsby theme for MUI!

@oliviertassinari
Copy link
Contributor

Actually, I was wrong. We still need a plugin for Gatsby with Material-UI v5 based on mui/material-ui#26561 (comment). Now, there is an extra layer of complexity, we support emotion and styled-components. So while we could argue, just use these plugins, we could also argue that these plugins do it wrong.

@ZLevine
Copy link
Author

ZLevine commented Aug 5, 2021

Gotcha. Yeah, it seems that because of all the complexity MUI requires for initial setup, a plugin would be preferable. Themes are great to "bootstrap" based on the plugin but a plugin seems more appropriate here.

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Aug 5, 2021

We can start from https://github.com/mui-org/material-ui/tree/next/examples/gatsby/

@hupe1980
Copy link
Owner

hupe1980 commented Aug 6, 2021

I have prepared the next branch accordingly

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Aug 8, 2021

@hupe1980 Awesome, I have left a few comments on c18fff2 if you want to push it the extra mile.

My main concern with Gatsby is the trend it's on: https://npm-stat.com/charts.html?package=gatsby&package=next&package=react-scripts&from=2020-08-07&to=2021-08-07.

@hupe1980
Copy link
Owner

The plugin can now also be used for V5:

npm install gatsby-plugin-material-ui@next @emotion/react

Only emotion is supported at the moment!

@ZLevine
Copy link
Author

ZLevine commented Aug 11, 2021

The plugin can now also be used for V5:

npm install gatsby-plugin-material-ui@next @emotion/react

Only emotion is supported at the moment!

This is fantastic news! Will test this out soon.

@hupe1980 Awesome, I have left a few comments on c18fff2 if you want to push it the extra mile.

My main concern with Gatsby is the trend it's on: https://npm-stat.com/charts.html?package=gatsby&package=next&package=react-scripts&from=2020-08-07&to=2021-08-07.

Yeah—from experience, Gatsby SSG can be a pain for larger sites and they don't have true SSR like Next does. For smaller sites, it's still a really great way to bootstrap things and get up and running quickly. I love the Gatsby plugin ecosystem but there's an open RFC in Next for the same thing. Next seems to be leaping over them in terms of features, performance, and developer experience. It's easier for Next to compete because they have a real company behind them that makes money from a myriad of products.

Anyways, I don't think Gatsby is going anywhere and it will continue to have a place. Just not necessarily for large sites. :)

@ZLevine
Copy link
Author

ZLevine commented Aug 13, 2021

Just tested and can confirm that MUI V5 functions correctly on the next branch! Thanks @hupe1980 and @oliviertassinari . Will log new issues if I run into anything else in development.

@ZLevine ZLevine closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants