News for hackers. Stuff that matters.
Re:State of React and CSS by abritinthebay on Monday April 04, 2016 @05:44PM (#11425960)
CSS Modules is a CSS design pattern. Yes you chose what classes to apply to the component in the code but... you'd do that anyhow.

CSS Modules is not a CSS-in-JS framework - which is what I'm talking about - it's a design pattern for CSS abstraction.

That's all good, I prefer Atomic Design principles but the concept is similar.

Re:State of React and CSS by talmand on Monday April 04, 2016 @06:16PM (#11426197)
That's the part I don't get. From the suggested articles explaining CSS Modules I see examples that are easily controlled with simple, vanilla CSS without even the need of a processor. I even see examples where they get more complicated in the SASS part to compare against and yet a simplified CSS pattern (which they even suggest at first) achieves the exact same result. It's almost like those infomercials where the problem is exaggerated to compare against the thing being marketed. I'm interested in these concepts of CSS-in-JS and I really wish the projects wouldn't fall back on such comparisons.
Re:State of React and CSS by abritinthebay on Tuesday April 05, 2016 @02:13AM (#11428218)
Indeed. CSS-in-JS is solving a problem that doesn't actually exist. Or rather... only exists because many programmers refuse to learn good practice with CSS.