top | item 38539210

(no title)

tlrobinson | 2 years ago

- Styles colocated with markup/logic (I consider this an advantage with a component library like React, others may not)

- No global styles stomping on each other, styles scoped to a single module unless explicitly exported/imported

- Type safety, if using TypeScript

The main downside is often performance, though

discuss

order

naman34|2 years ago

We're solving the performance pitfall of CSS-in-JS libraries by making a compiler instead. In the vast majority of cases, there should be zero runtime cost to using StyleX.