3 ms·
This is probably a better place to start: https://stylexjs.com/blog/introducing-stylex/ https://stylexjs.com/blog/introducing-stylex/ > We created StyleX not o
by CharlesW 3y ago
This is probably a better place to start: https://stylexjs.com/blog/introducing-stylex/ 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.
- tlrobinson 3y agoShopify has a styling library for React Native called Restyle: https://github.com/Shopify/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.
- superfrank 3y ago> 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/#framework-agnostic 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.