▲ | Forking Styled Components(github.com) | ||||||||||||||||||||||
32 points by coloneltcb 6 days ago | 7 comments | |||||||||||||||||||||||
▲ | lioeters 2 days ago | parent | next [-] | ||||||||||||||||||||||
The CSS-in-JS approach has always felt to me like too many steps removed from actual CSS. I tried Styled Components long time ago and didn't like it. I prefer CSS Modules, and Sass still (though trying to move away due to breaking changes in next major version). And use JS to only add/remove classes. Interesting, in their list of long-term CSS-in-JS alternatives, they include Tailwind. I see it as CSS in HTML/JSX class attributes. Then I suppose HTMX is JS in HTML. A new one I hadn't heard of, React Strict DOM. Apparently it's a cross-platform styling library for React Native. https://facebook.github.io/react-strict-dom/ > React Strict DOM lets you create user interfaces that look and feel right on every platform. Web apps are rendered to HTML and rely on static CSS. Native apps look and feel native because the UI is truly native, not a web view. Yeah, for this use case, I can appreciate the value of having styling primitives in JSX. It's not CSS, but a higher abstraction that includes web and platform-native styles. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | blabla1224 2 days ago | parent | prev | next [-] | ||||||||||||||||||||||
For the rich SPA, styled-components is one of the best things that happened to the Web (CSS-in-JS) | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | user1999919 2 days ago | parent | prev [-] | ||||||||||||||||||||||
limitless paper in a paperless world |