Live data from Hacker News

StyleX – Meta's styling library

stylexjs.com

81–86 of 86 posts

Re: StyleX – Meta's styling library

#81

Borrows a lot from emotion/styled-components it appears. The extensive typing seems to be the biggest feature. They mention why I should choose it over BEM or Tailwind, why choose it over MUI though?

Does anyone really like Material UI? I find it so clunky and heavy.

I for one don’t. I appreciate the incredible amount of effort the developers put into it, but I really dislike the basic affordances as prescribed by Material Design and end up customizing it a lot… and it clearly show its limits the

Re: StyleX – Meta's styling library

#82

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.

It needs a plugin, but I see no custom syntax, it’s just JS?

Re: StyleX – Meta's styling library

#83
post #80
post #39

Earlier quoted context omitted.

Announced at React Conf 2018, I was so hyped for it back then! I did not expect it to take 5 years. https://youtu.be/9JZHodNR184?t=270

We should keep this in mind and adapt our expectations about forget, the compiler that they announced like one year ago

already forgotten

Re: StyleX – Meta's styling library

#84

Earlier quoted context omitted.

I got the impression it was not dynamic values? Just that you can combine static objects dynamically. If I’m wrong I’ll re read the docs but someone else pointed that out to me and linked part of the docs that seemed to indicate that.

It does support dynamic values.

Can you link me to how you know that? The docs seem to indicate it doesn't:

"Since StyleX depends on ahead-of-time compilation, it is important for all your styles to be statically analyzable"

"No runtime style injection."

"All styles are bundled in a static CSS file at compile-time."

---

By dynamic styles I assume we're talking about something like this:

{ backgroundColor: props.thirdPartyColor ?? randomColor() }

Re: StyleX – Meta's styling library

#85

Earlier quoted context omitted.

It does support dynamic values.

Can you link me to how you know that? The docs seem to indicate it doesn't: "Since StyleX depends on ahead-of-time compilation, it is important for all your styles to be statically analyzable" "No runtime style injection." "All styles are bundled in a static CSS file at compile-time." --- By dynamic styles I assume we're talking about something like this: { backgroundColor: props.thirdPartyColor ?? randomColor() }

https://stylexjs.com/docs/learn/styling-ui/defining-styles/#...

Re: StyleX – Meta's styling library

#86
post #85

Earlier quoted context omitted.

Can you link me to how you know that? The docs seem to indicate it doesn't: "Since StyleX depends on ahead-of-time compilation, it is important for all your styles to be statically analyzable" "No runtime style injection." "All styles are bundled in a static CSS file at compile-time." --- By dynamic styles I assume we're talking about something like this: { backgroundColor: props.thirdPartyColor ?? randomColor() }

https://stylexjs.com/docs/learn/styling-ui/defining-styles/#...

Cool, thanks Naman. It’s really great work overall, congrats on the launch. Maybe those couple places could have wording that indicates it supports dynamic as well.
Post reply on HN