Live data from Hacker News

StyleX – Meta's styling library

stylexjs.com

11–20 of 86 posts

Re: StyleX – Meta's styling library

#11
post #2

This is probably a better place to start: https://stylexjs.com/blog/introducing-stylex/ > We created StyleX not only to meet the styling needs of React developers on the web, but to unify styling for React across web and native. Meta friends, the names "Review" and "Restyle" were right there .

Shopify has a styling library for React Native called Restyle: https://github.com/Shopify/restyle

I like it a lot. It lets you define a theme with design tokens like spacing and colors, then enforces using only those via TypeScript (with an escape hatch via style prop), which also gives you editor autosuggest support without hacks like the Tailwind extension.

Re: StyleX – Meta's styling library

#12
post #2

This is probably a better place to start: https://stylexjs.com/blog/introducing-stylex/ > We created StyleX not only to meet the styling needs of React developers on the web, but to unify styling for React across web and native. Meta friends, the names "Review" and "Restyle" were right there .

> StyleX is a CSS-in-JS solution, not a CSS-in-React solution. Although StyleX been tailored to works best with React today, It's designed to be used with any JavaScript framework that allows authoring markup in Javacript. This includes frameworks that use JSX, template strings, etc.

https://stylexjs.com/docs/learn/thinking-in-stylex/#framewor...

I wouldn't be surprised if they avoided starting with "re" on purpose to avoid it seeming like this was a react only framework.

Re: StyleX – Meta's styling library

#18

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.
Post reply on HN