Hacker News new | ask | show | jobs
by mvolkmann 2899 days ago
If you like templates and framework-specific syntax for conditional logic and iteration sprinkled into your HTML then you will love Vue. If you prefer the JSX approach and relying on JavaScript for conditional logic and iteration then you will love React. Vue does support JSX, but it is not the idiomatic way to use Vue.
4 comments

The other huge difference is how much React beneficiates from static typing (typescript for instance) whereas just like angular, vue templates and all the glue code cannot possibly benefit from it. A vue or angular app is almost as typed checked as a JS app.

I feel most vue lovers don't care about static typing.

Vue 3.x (future) is targeting first class Typescript support

https://github.com/vuejs/roadmap/blob/master/README.md

Vue templates do not, but non-template component code very much benefits from Typescript. And of course, there is a lot of non-component code in SPAs. Vue app might be two thirds as checked as React app.
I like business logic in JavaScript and presentation logic in templates - for me Vue fits the bill.
What’s the benefit of a crippled pseudolang for use in templates?
The avoidance of a myriad footguns and being forced to avoid complex logic in your templates.
Dude... Ridiculously complex logic in the view is like the quintessential problem of templates; this problem is further amplified by the burden of groking the idiosyncrasies of every other self-styled templating API.
I would say the other big deciding influence is that Vue leans towards the idea of a persistent state object with watchers that you update in place, while React leans towards disposable state objects that you update by calling a method that re-renders with a new disposable state object.
I use watchers as a last resort in Vue. It's possible and common to program in Vue using very functional style.
That is definitely true.