Comment

Comment by dmak

It's just my personal opinion.

When you learn React with JSX, you just need to know JS and everything else is pretty much predictable. Whereas in Vue, you have to learn JS and all the declaration markups of Vue (ex, v-bind, v-for, etc...); it's less predictable and someone who understands JS would still have to learn those things. Ex, if you knew how to write a loop in JS then you can write a loop to output React components. In Vue, you have to learn how to use v-for. When you start talking about filters and other things, it gets overly complicated in Vue (like AngularJS).

Two-way binding was a thing in early AngularJS days similar to Vue, and they both found out through iteration that it's not as great in practice as in theory. I believe Vue3 is only one-way binding now? With the composition API, you're encouraged to use defineEmits as the callback mechanism to parent components similar to React's paradigm. When React came out, it was all one-way binding and it made sense and worked well.

Vue's composition API with the defineProps and defineEmits creates a similar component composition structure to React's effect hooks. However, the general structure of the component still requires Vue syntax (ex, <template>, <script setup>, etc...). In React, you just write a JS function and return what you expect to render.

Vue is also a bit too magical in how their props work especially when you are using <script setup>. It's not obvious that props can be inherited unless you read the documentation. In React, it's just JavaScript and you get the props through the function arguments.

I think the common "strengths" of Vue are often applicable to all frontend frameworks, because it's all JavaScript at the end of the day. This is all just my opinion though.

parent dmak 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton