Re:Facebook Open Sources StyleX
by matesz on Wednesday December 06, 2023 @01:49AM
(#38541099)
Unfortunatelly this is the state of software these days - half-baked libraries + incremental improvements. This doesn't work in most cases. I wouldn't call it mistake though, open sourcing anything is a good thing.
The right solution is a library like this with proper cross-platform abstraction. Then you can simply compile css-in-js to stylesheets to have caching, therefore fully utilizing platforms capabilities.
Who cares whether css is written in css files or js files or whatever. Abstraction + solid tooling (compilation) + ide support is the way.
Re:Facebook Open Sources StyleX
by sdflhasjd on Wednesday December 06, 2023 @04:28AM
(#38541956)
JSX is so good because it's an effective language extension, but CSS-in-JS still feels like a dirty mess, everything just becomes strings in objects, it just takes the elegance of the CSS syntax and throws it out the window.
The right solution is a library like this with proper cross-platform abstraction. Then you can simply compile css-in-js to stylesheets to have caching, therefore fully utilizing platforms capabilities.
Who cares whether css is written in css files or js files or whatever. Abstraction + solid tooling (compilation) + ide support is the way.
Like, look at this:
Hmmmm