Hacker News new | ask | show | jobs
by CharlesW 924 days ago
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.

2 comments

> 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.

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.