Live data from Hacker News

Material-UI is releasing v5 and rebrands to mui.com

mui.com

11–15 of 15 posts

Re: Material-UI is releasing v5 and rebrands to mui.com

#11

Reading through the styling part and working with mui4 and other widget libraries in the past - and seeing the 5 solutions listed that basically do the same thing - holly shit how did it get to this point... I got the value of JSX even if it felt messy - but the css-in-js becoming popular on frontend is one of the why I switched to full backend roles now. And when he says that changing the implementation of a styling…

I'm not familiar with JSS, but styled-components works by creating a whole new React component for each layer of styling that you'd traditionally use a CSS class for. And despite appearances React components aren't just function calls, they're persistent objects that carry their own overhead. So doing things this way seriously inflates the work that has to happen at runtime.

Using "plain styles" in a component-oriented architecture relies on convention more than I'd like it to, but... the cost of the CSS-in-JS solutions I've seen just seems too high to be worth it. I don't know what the solution is.

Re: Material-UI is releasing v5 and rebrands to mui.com

#12
I think Material UI (and the whole ecosystem of Javascript libraries of which it's a part) are drastically underestimating the costs that churn imposes on their users. I say this as a developer of a codebase currently on material-UI v3, looking at v4 and v5, having bounced off the task of upgrading a few times and currently thinking it's probably not worth it.

Material-UI v3 had an issue (which I think v4 and v5 probably still have?) where CSS-in-JS winds up retranslating Javascript blocks into CSS and adding them to every SSR, and then retranslating them again on the client as part of the pageload, which wasn't performant enough for us. So we set up a system where we would pregenerate a static stylesheet with deterministic names, and serve that as a cacheable resource. Then v4 comes along and all of the CSS-in-JS related wiring is different, so our static stylesheet thing would have to be rewritten, and then v5 comes along and it's been redone again, and it doesn't look like I want to touch this without some signal that it's stabilized.

Re: Material-UI is releasing v5 and rebrands to mui.com

#14
I absolutely love this library. I've used several ui toolkits before, and mui is my favorite. It's consistent, very well made, focused on react and responsible with not introducing unexpected breaking changes (unlike another popular library which I used to use).

Also, I was surprised how well the codemod worked with the migration to v5. I've migrated a large code base and almost didn't have to do anything.

The only thing I'm not a big fan of is that using the new 'sx' prop, the styling becomes very specific to the library. But I guess it's more of an issue with the fragmented state of styling in react. I think it'll stick with the 'styled' api since it's more generic.

Great job and thank you!

Post reply on HN