News for hackers. Stuff that matters.
Re:Don’t use IDs in CSS selectors? (2011) by reverius42 on Wednesday November 19, 2014 @08:36PM (#8633919)
Totally agree. I have found that most of the problems solved by separating CSS, HTML, and JavaScript weren't really problems to begin with, if you model your application views the way React does (as a render function that produces DOM tree based on external properties and internal component state). Somehow using multiple technologies (CSS for styling, HTML for markup, JavaScript for logic) got conflated with "separation of concerns", but true separation of concerns involves separating component A from component B. Encapsulating the entire component in JS actually helps cohesion.

There are no comments on this comment yet.