Re:Why we chose Vue.js over React
by tannhaeuser on Sunday December 11, 2016 @05:55PM
(#13153928)
I agree about conditionals and other kind of programming language constructs not belonging in markup. But the point of markup for content-driven web sites is that its a text format and can be contributed by persons other than web developers (authors, site users, syndicated content providers, etc).
You can see a modern approach for this is at work here: http://sgmljs.net/docs/sgmlweb.html ("isomorphic" rendering to HTML in the browser and server-side using full SGML, no less).
Disclaimer: my project
Personally I prefer an all JS solution because it's better suited to handle conditions and loops as compared to using custom SGML markup with framework-specific tags and attributes. In my opinion SGML/XML should only be used for markup, not program logic.
There are a few things I think React got wrong though - handling of children being one. Having different code paths to handle a single child versus multiple children was a design mistake. The Children convenience module is awkward to use. The state life cycle and immutability in React takes a while to get used to. It does seem more complicated than it needs to be and has spawned a plethora of React state management add ons.