Live data from Hacker News

Vue.js vs. React

vuejs.org

151–160 of 486 posts

Re: Vue.js vs. React

#151
post #126

Earlier quoted context omitted.

I saw a talk on Polymer about 2 years ago where it was the next big thing, here we are two years later and it doesn't seem to have progressed at all - I do get that it is the future I just don't think it's one that's quite ready yet.

You mean it hasn't catch on with the community or it hasn't progressed as a technology?

The former, no idea on the latter.

I tend not to pay serious attention to technologies until they are popular and have been used for a while (I always adopt on the back side of the hype/productivity curve, since I'm not completely a front end developer).

Re: Vue.js vs. React

#153
post #126

Earlier quoted context omitted.

You mean it hasn't catch on with the community or it hasn't progressed as a technology?

The former, no idea on the latter. I tend not to pay serious attention to technologies until they are popular and have been used for a while (I always adopt on the back side of the hype/productivity curve, since I'm not completely a front end developer).

Yeah, certainly it doesn't seem to get love here on HN.

However now https://www.webcomponents.org/elements has over 1k elements and Polymer slack channel is over 8k users, the community is active and there are lots of enterprise users adopting it (Netflix, IBM, GE, EA - not only Google).

IMO while that is not bad at all, react is obviously more popular, but when we talk about hype driven development - VueJS is one man project as you can see on GH, 99% of code is by single contributor - but based on hype you would feel safe adopting it.

Re: Vue.js vs. React

#154

Earlier quoted context omitted.

Go grind your axe somewhere else... Why would you go off on some random person on the internet when obviously didn't have the relevant context? Moreover, you failed to acknowledge the points they made in response!

This is behaviour that's harmful to the web as a whole. The loop of "everyone only uses chrome" → "I only need to support chrome with my website" → "nothing works on firefox, I'll switch ti Chrome" is harmful to the entire internet industry, and the startuo economy. It is harmful to all of us, and hurts all of our future.

I agree with with you that this is an important issue. However, your aggressive comments that ignore what the other person said may not be helping.

Re: Vue.js vs. React

#155
post #16

Earlier quoted context omitted.

People keep on saying this, but I've written complex apps with both Vue and React (using state stores) and there don't to be any apparent scaling differences. They even use the same component model (virtual DOM, props down, events up). There are some claims that Vue uses two-way-binding which is unmaintainable, but v-model isn't true two way binding and is just syntax sugar for builtin tags: https://v1.vuejs.org/guid…

> lets you write templates with HTML attributes that's somewhat bothersome... does it typecheck on compile time? hope vue works on typescript-language-specs compliant plugin... As for react, there's TSX (typescript-jsx) that works great (typechecks on props, state, etc.), but I haven't tried it with vue.

If you use single file components, there are some common compile time checks by default for the render function, but I'd argue that type checks are not as necessary as in JSX (which you can use with full type checking in Vue) due to separation being encouraged.

Type checking for props and state inside the tags is fully supported: https://vuejs.org/v2/guide/typescript.html

If you want type checks for inline code (which isn't suitable for anything non-trivial, you should use computed properties or methods instead), see https://github.com/DanielRosenwasser/typescript-vue-tutorial

If you are using uncompiled components (newbies using script embeds) with no build step at all, there are clearly no compile time checks. IMO this is why Vue is significantly more newbie friendly.

Re: Vue.js vs. React

#156
post #108

I've built semi-large applications in both Vue.js and React. I like both but prefer React. For me Vue.js is like a light-weight Angular 1, in a good way. It's very intuitive and you can start working immediately. It does however easily end up in confusion about where the state lives with the two-way binding. I've run into a lot of implicit state changes wrecking havoc. The declarative nature of React definitely wins…

Vue removed real two-way-binding in 2.0. The v-model you commonly see is just syntax sugar.

Also, here's the obligatory "Vue supports JSX" link: https://medium.com/js-dojo/using-jsx-with-vue-js-846f4fbbf07...

I personally feel that JSX feels a bit "unnatural" compared to Vue's DSL, but that's a matter of opinion. It's always good to have the option :)

Re: Vue.js vs. React

#157
post #81
post #61

Earlier quoted context omitted.

You can't write JSX without a template compiler (how ergonomic is it to hand write a render function?). It's painful to write React components with just a script embed (this might not be important to you , but it's important for newbies coming from jQuery), while Vue lets you get away with HTML attributes and Vue.extend(). Lastly, Vue's style scoping is superior to anything React has to offer.

Hu? You can write JSX with just script embed.

..How? You'd just get a syntax error. Embedding a runtime babel compiler isn't mentioned in the docs at all (though I guess it would work albeit killing load performance, but it's not something that you would expect newbies to know, especially if it's not in the docs).

Re: Vue.js vs. React

#158
post #53
post #37

Earlier quoted context omitted.

I was a huge Ember evangelist until I started trying to onboard other devs into my project. It took months for people to figure out which way was up. In comparison, other devs picked up Vue in a week or so.

Interesting, because my company chosen Ember precisely because it would start a hiring wave of new developers, often junior ones. Mostly because of Ember's "convention over configuration". I dont see much of this problem, including myself as one of these just hired jr devs.

The projects I work typically have very fast turn around times (2-4 months), so I don't have the time to teach a dev use a framework, and I definitely don't have the time to onboard junior developers.

I need a framework where any experienced JavaScript developer can pick up the project and deliver working product in a week. With Ember/Angular/React+Redux, I have to hunt for a developer that specializes in that particular framework. With Vue, the hiring pool is vastly larger.

Re: Vue.js vs. React

#159
post #108

I've built semi-large applications in both Vue.js and React. I like both but prefer React. For me Vue.js is like a light-weight Angular 1, in a good way. It's very intuitive and you can start working immediately. It does however easily end up in confusion about where the state lives with the two-way binding. I've run into a lot of implicit state changes wrecking havoc. The declarative nature of React definitely wins…

Thanks for the Vue bestpractices!

For newcomers like me, I've found these videos very useful: https://laracasts.com/series/learn-vue-2-step-by-step

Extra tips:

* use axios to transfer data, no need for jQuery

* when you find yourself reaching for jQuery to change DOM, eg add/remove a class, think again. v-if depending on component state data variables worked well for me.

* after trying several authentication libraries, found it simpler to build my own layer, storing user state in Vuex

Anybody has more tips to share? Something you wish you knew earlier?

Re: Vue.js vs. React

#160
I use material design. Angular and React have the best MD libs as of a month ago.

I also make mobile apps. Angular and React have the best native apps as of a month ago.

I use old devices. React and Vue are the most responsive.

Large companies use React on desktop and mobile.

React it is.

Post reply on HN