Can we apply the lessons of CSS to JavaScript?
While working on StyleX we use compilation and the technique Atomic CSS to create a more efficient system. Having small atomic CSS rules maximizes re-usability and dramatically reduces the size of the CSS at scale. A powerful compiler, makes the process automatic and frees from having to think custom DSLs.
Can we do the same for JavaScript? What would the trade-offs be? Can it result in unique benefits not possible with most other approaches?
This talk has been presented at React Summit 2025, check out the latest edition of this React Conference.