|
|
|
|
|
by gpmcadam
1061 days ago
|
|
One of the strangest things to infect the web development community was that separation of concerns somehow meant separation of HTML/JS/CSS, which to me always felt like the opposite since very often the HTML, the JS and the CSS were all very much concerned with one another e.g. a React component where the rendered HTML, the logic behind it and how it's styled make sense to live next to one another. I think it's for this reason you often see those languages split out in code playgrounds. And I also think it's a big part of the initial pushback against css-in-JS libraries such as styled-components or Emotion. |
|
This is why I absolutely love Vue single-file components. AFAIK, there’s no elegant substitute for these in React.
https://vuejs.org/guide/scaling-up/sfc.html