Live data from Hacker News

StyleX – Meta's styling library

stylexjs.com

61–70 of 86 posts

Re: StyleX – Meta's styling library

#61
Part of me was holding out hope that React and it’s surrounding ecosystem might at some point end up back on a path that is somewhat more aligned with the rest of the web and had some meaningful sense of interoperability with everything that’s not React.

This certainly inspired no confidence in that.

All I will say is that CSS has gotten a LOT better in the past 5 years and for almost every scenario I can think of you would be in such a better position if you just spent a month learning that rather than this new abstraction.

Re: StyleX – Meta's styling library

#62
post #61

Part of me was holding out hope that React and it’s surrounding ecosystem might at some point end up back on a path that is somewhat more aligned with the rest of the web and had some meaningful sense of interoperability with everything that’s not React. This certainly inspired no confidence in that. All I will say is that CSS has gotten a LOT better in the past 5 years and for almost every scenario I can think of yo…

Could you share some resources that you have found useful to renew basic CSS knowledge?

Re: StyleX – Meta's styling library

#63

Earlier quoted context omitted.

Do you work on deere.com? I haven't seen a conditional comment in a while! > I think that site could benefit from something like this. The CSS on that site is, um, not optimized.

No, I worked on internal facing stuff that was only accessible by dealers

Sounds like simple crud apps that barely need styling and can use existing component libraries.

Re: StyleX – Meta's styling library

#66

Earlier quoted context omitted.

You already have to name your CSS classes, and atomic CSS libraries are chock full of names you must learn . What do you mean "inline style prop," writing CSS in the HTML style attribute? That's a nightmare to manage across large apps, not composable or reusable, and this library compiles to performant styling (according to the authors/examples).

e.g. using mui sx. the downside is the runtime performance cost https://mui.com/system/getting-started/usage/#performance-tr... i don't want to reuse or compose my styles, i just want to add alignSelf: 'flex-end' and then easily be able to change it and see the styles in one place, without leaving the component definition. the reusability and composition is at the component level

Thanks! Great reason this beats MUI.

Not trying to hate on atomic CSS, composable classes and style tokens are good. Even one of the devs on this project commented on them here:

> We don't think the Tailwind way of styling is readable in the long term, but we see the value is being able to author that way

https://news.ycombinator.com/item?id=38540629

The docs here mention the downsides though.

Re: StyleX – Meta's styling library

#67
post #62
post #61

Part of me was holding out hope that React and it’s surrounding ecosystem might at some point end up back on a path that is somewhat more aligned with the rest of the web and had some meaningful sense of interoperability with everything that’s not React. This certainly inspired no confidence in that. All I will say is that CSS has gotten a LOT better in the past 5 years and for almost every scenario I can think of yo…

Could you share some resources that you have found useful to renew basic CSS knowledge?

This and the rest of his content were very useful resources imo.

https://www.joshwcomeau.com/css/interactive-guide-to-flexbox...

Re: StyleX – Meta's styling library

#68
React is one of these things that was designed to be unbeareable tonuse without custom syntax, but at least it is possible. This looks looks like it does not work without custom syntax at all. Type safety is a nice to have, but it should not need an exotic compiler plugin.

Re: StyleX – Meta's styling library

#70

Their introduction page[0] makes this look like material ui's makeStyles[1] approach? [0] https://stylexjs.com/docs/learn/ [1] https://mui.com/system/styles/basics/

Yup, but without the handy `classes` prop so people can modify styles.

Plus, I find with v5, I never touch `makeStyles` / `styled`, the utility props / sx are enough.

Post reply on HN