News for hackers. Stuff that matters.
Re:Show HN: Single-file components for React by dahart on Thursday October 05, 2017 @12:37PM (#15410528)
Last time I checked, CSS-in-React didn't have 100% CSS coverage, there were some things you still have to do natively. Has that been fixed recently?

CSS-in-React is sometimes pretty useful, but personally I'm not in love with it... because the attribute names are camel-cased, and you're running JS code to set styles that the browser already has a mechanism for that doesn't need to run code.

Re:Show HN: Single-file components for React by allover on Thursday October 05, 2017 @01:33PM (#15410915)
Several CSS-in-JS libs support all of CSS, and allow you to write actual CSS and not camelCase styles.

styled-components [1] is prob the most popular example.

Your complaint they are evaluating JS just to set styles is valid, tho some libs, like emotion [2] support static CSS extraction.

[1] https://www.styled-components.com/docs/api#supported-css [2] https://github.com/emotion-js/emotion