Hacker News new | ask | show | jobs
by sensanaty 739 days ago
As a React dev at $DAYJOB, how React remains at the top despite the existence of infinitely better alternatives like Vue or Svelte will forever be baffling to me
1 comments

What do you like about Vue? I use Vue at work and yearn for React (though, I haven't written much React since the shift to hooks).
The biggest one to me is the lack of reactivity footguns. Vue will just handle reactivity for you, with no weird gotchas, and it will work 99% of the time without any performance penalties. You can just push/pop items to/from a reactive array, and Vue will just handle that for you. You never have to worry about weird double-render issues, and memoization is done by the framework automatically and intelligently.

There are some edge cases, like Maps and Sets where you don't get reactivity out of Vue which is unfortunate, but in the large majority of usecases it's dead simple.

Other than that, at least for myself Vue's mental model makes more sense with the event bubbling. You don't have to drill down 20 different methods to change a piece of state, you just rely on the children firing an event and then you just change the state straight from the parent, it feels like a natural extension to native browser events.

Sorry, I didn't see this 'til now.

I am astounded that you haven't had reactivity issues.

With Vue 3 + the composition API I've found the reactivity to be much more difficult to understand than React.