Live data from Hacker News

Vue.js vs. React

vuejs.org

21–30 of 486 posts

Re: Vue.js vs. React

#21

Earlier quoted context omitted.

This is the impression I get, but I've not got any Vue experience to back it up so it's literally just based on first impressions. I completely agree that React can feel like overkill for simple stuff, but really shines as the apps get more complex - complexity feels a lot more manageable. For example, I built this in-browser Illustrator-inspired site/app using React and couldn't have imagined doing it without (in te…

What is complex about the site?

Managing the state and rendering of all the text items as the user manipulates them (this is on the desktop "type tester" homepage, not mobile) - essentially trying to build a "desktop-class" (to some degree!) experience à la Adobe Illustrator.

The rest of the site is pretty basic granted. Maybe it's not a great example, but it's the sort of thing that could have easily become unmaintainable in the old days as features were added quickly, but React and the component model (and MobX) made it much more manageable even as I hacked things in last minute ;)

Re: Vue.js vs. React

#22
post #11

Vue is good for simple things. But it do not shines for complex apps and sometime makes it even harder than it should be. React can appears complicated when beginning, but it pays off on complex apps.

This is totally not true. It depends on how you structure your project. Vue is good for simple things but it scales way better for large complex apps than React. Why? Less boilerplate. And less boilerplate = less code to maintain. Vue HTML template functions are really well designed with just enough functionality to make your life easier but also encouraging you to build custom components when you need something custom :)

My only suggestion for people starting with Vue is to not be afraid of directives (Vue directives are nice and have nothing to do with Angular directives), group your .vue components into directories and don't jump into Vuex right away (same goes for React beginners, don't force yourself to learn Redux for your 1 page app).

Re: Vue.js vs. React

#23

How are people getting along with Vuex vs Redux? It looks pretty clean and grokable in the examples and deals with async out of the gate - https://github.com/vuejs/vuex/tree/dev/examples/counter

Using Vuex has a lot less overhead than Redux and async is super! It's fairly easy to keep modular.

Here's a medium size store for a project I worked on: https://github.com/tmm/notational/tree/master/src/store

Re: Vue.js vs. React

#24
post #11

Vue is good for simple things. But it do not shines for complex apps and sometime makes it even harder than it should be. React can appears complicated when beginning, but it pays off on complex apps.

> but it pays off on complex apps.

so does Angular

Re: Vue.js vs. React

#26
I used React for a few years and it was great and powerful, there were many things however that I disliked.. Particularly I was not a fan of JSX. I liked React but I did not feel comfortable using it.

When I first saw VueJS I had a hard time understanding how it would be any better than React, that is until I saw single file components.

https://vuejs.org/images/vue-component.png

I fell in love with the eloquence of being able to separate my HTML, JS, Styles for a single component.. it seemed /right/ to me..

In any case, I've been using VueJS ever since for my new projects moving forward and I'm very happy with it. It has everything I would ever need from React but in what I feel is a more polished and thought-out way.

Just my two cents :)

Re: Vue.js vs. React

#27

MithrilJS

Oh if only mentioning mithrils name would be enough to explain it's benefit I think a lot more people would be using it, but we need to do a bit better than that. Mithril is one of the few libraries that really embraces JavaScript and the beauty of a clean abstraction and lean API. There's no heavy learning curve, just learn a couple of method signatures, and you're ready to go. Once you need to do something advanced or use a third party library mithril won't be in your way! I still haven't seen anyone happily go back to react or vue for that matter after experiencing mithril.

https://mithril.js.org

Re: Vue.js vs. React

#28
post #12
post #7

I would go with react just because it is more popular. Unless you are someone with free hand picking a technology that is more widespread (hence more in demand) is in this era the wise choice to make.

The demand for both React and Vue.js is growing tremendously. There isn't really a wrong choice to make here. (I would also say the same goes for picking programming languages, as long as it's one of the top ~15, and you stay somewhat flexible.)

There is way more demand for Angular and react than there is for Vue

Re: Vue.js vs. React

#29

How are people getting along with Vuex vs Redux? It looks pretty clean and grokable in the examples and deals with async out of the gate - https://github.com/vuejs/vuex/tree/dev/examples/counter

If you use something like Kea (https://kea.js.org), the amount of boilerplate for Redux goes down dramatically. The syntax is actually pretty simiar to Vuex, perhaps with even less boilerplate.

Re: Vue.js vs. React

#30
post #19

I've used both. What makes me pick Vue in the end is the fact that there is no compiler needed, no jsx and all the non-sense that goes with that. If you want a full blown huge application to last years, then go Angular... Although who knows if Angular will be there in 5 or so years. There is no perfect library/framework but I love Vue because Vue does exactly what it says on the tin.

> If you want a full blown huge application to last years, then go Angular.

After what they did with Angular 1 -> 2 not a chance.

At least with Vue you can swap it out a lot more easily if it does go away in 3 years.

Post reply on HN