5 ms·
1. Template syntax instead of JSX, the latter being unfamiliar and initially off-putting to many. 2. Two-way data binding. Convenient, no need to write handler
by erokar 9y ago
1. Template syntax instead of JSX, the latter being unfamiliar and initially off-putting to many.
2. Two-way data binding. Convenient, no need to write handler functions.
3. Comes off as a better version of Angular. Appealing if you're familiar with Angular.
4. Comes off as more curated than React with regards to e.g. routing and state management, less need to shop for libraries.
5. More performant in some situations.
That said, I prefer React. I consider 1 and 2 drawbacks of Vue compared to React.
- KitDuncan 9y agoTwo-way databinding is not supported by Vue 2 if I remember correctly. You can do it, but you'll get console logs, about how you should avoid doing it.
- erokar 9y agoIt seems to be supported in Vue 2.x to me: https://vuejs.org/v2/guide/forms.html https://vuejs.org/v2/guide/forms.html
- regecks 9y agoTwo-way binding does exist, just not in the same problematic way it existed in Vue 1. It was changed to just be syntactic sugar for the event handler approach - https://vuejs.org/v2/guide/forms.html https://vuejs.org/v2/guide/forms.html .
- roblabla 9y agoJust a nitpick, but you can use JSX in vuejs : https://vuejs.org/v2/guide/render-function.html#JSX https://vuejs.org/v2/guide/render-function.html#JSX
- threatofrain 9y agoBut how is the JSX story in Vue? Every time I ask this I kind of get crickets, because it seems just about everyone is using the default template syntax.
- alevans4 9y agoI agree. JSX is supported but in my experience, very rarely used.