News for hackers. Stuff that matters.
Re:Will Vue.js become a giant like Angular or React? by emn13 on Sunday June 18, 2017 @12:03PM (#14581249)
He's definitely not wrong. Vue.js supports and promotes templates (e.g. right on the very "get started" page the homepage links to: https://vuejs.org/v2/guide/#Conditionals-and-Loops) with yet another NIH looping and conditional syntax. Perhaps it's possible to avoid - but that kind of flexibility simply encourages messy codebases.
Re:Will Vue.js become a giant like Angular or React? by sgustard on Sunday June 18, 2017 @12:38PM (#14581451)
JSX is not a requirement for React. React has the same kind of flexibility you are criticizing.

https://facebook.github.io/react/docs/react-without-jsx.html

Re:Will Vue.js become a giant like Angular or React? by emn13 on Sunday June 18, 2017 @02:59PM (#14582229)
That's not at all the same, for (at least) 2 reasons.

- Defaults matter; templates as defaults means most examples, support, tools, extensions, etc. will assume templating.

- React without JSX doesn't actually affect the code structure or flow. Looping, conditionals, composition etc. all stay the same; and that shouldn't be surprising since JSX is essentially no more than a slightly different syntax for nested method calls and object literals; which is quite unlike templates in vue; those have actual semantics too.

I've used react without jsx before (some time ago for a coffeescript based project), and it affects little. If you do that, you'll want to introduce some alternative shorthand to avoid all those repetitive "React.createElement" calls, but doing so is trivial - after all, it's just method calls and object literals.

I'm not a huge fan of custom languages like JSX in general, and indeed JSX too (I believe) was a mistake. However, with sufficient support and a small enough target to support, it's less of an issue. Still, even extremely well funded projects like razor are clearly much less well supported by tooling than the language they're based on, even many years later. Vue's templates? Completely hopeless.

Re:Will Vue.js become a giant like Angular or React? by jolux on Sunday June 18, 2017 @12:55PM (#14581564)
Not a requirement per se, sure, but it's strongly suggested and other usages are not idiomatic.
Re:Will Vue.js become a giant like Angular or React? by tehbeard on Sunday June 18, 2017 @01:08PM (#14581647)
That is simply skipping the transpiling of JSX, the structure/nesting is the exact same, not some DSL crafted for templating.
Re:Will Vue.js become a giant like Angular or React? by cjalmeida on Sunday June 18, 2017 @01:09PM (#14581651)
React without JSX is very clunky at best.