Re:Virtual DOM is pure overhead (2018)
by JMTQp8lwXL on Monday May 20, 2019 @06:44PM
(#19966033)
I don't see how separate files forces you to think differently. It might aid in that effort, but it likely doesn't force it.
In effect, JavaScript logic tends to be procedural/imperative, while templates allow declarative semantics, and styles are nearly a 2.5D constraint language. "Separation of concerns" here means only having to think in a particular mode, rather than blending all of those modes of thought into a single eyespan.
Notably, Vue allows for single-file components, while preserving the familiar and intentionally designed separation of declarative (HTML), imperative (JavaScript), and aesthetic (CSS) code.