Live data from Hacker News

Vue.js vs. React

vuejs.org

171–180 of 486 posts

Re: Vue.js vs. React

#171
post #46

You'll see quotes in this thread like "The demand for both React and Vue.js is growing tremendously" thrown around. It's good to check out npm install stats to get an unopinionated comparison. https://npm-stat.com/charts.html?package=react&package=vue&p... In reality, React is downloaded roughly 4-5x more than angular and 7-8x more than Vue. In August so far, React has 75% market share among these three libs. Interes…

What's also important is that Vue 3x'd growth while React 2x'd growth.

I grabbed a point around the middle and one near the end. React: 642K > 1,184K. Vue: 53K > 155K

Re: Vue.js vs. React

#172
post #64

Earlier quoted context omitted.

From the charts, it shows that Vue from 2016 to now well over doubled it's downloads (over 100% growth) while react's only grew by 50%. It can be deceptive when you look at charts that list totals when what you're concerned with is growth rate.

So from 2016 to 2017, React's market share grew from 74.6% to 74.9% while Vue's market share grew from 5.4% to 9.3%. A more accurate narrative would be that Vue is eating the dying Angular.

From the beginning of 2009 to the beginning of 2010, Chrome's market share grew from 0.2% to 6.4%, while Firefox's market share grew from 32.1% to 32.9%. Both were eating the dying IE, whose market share slipped from 60% to 50%:

https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#W3...

Which one do you use now?

I remember that when Larry Page granted the Founder's Award to Chrome, there were several TGIF questions saying "Isn't it premature? Chrome's market share is only 5%, and the vast majority of web users have barely even heard of it."

Larry's response was "In my mind, Chrome has already won," and in hindsight, this is probably what he was referring to. When a large number of users are flooding into a brand new product, even though there's already an alternative that's pretty good on the market and still growing, that usually means that the new product fills some burning need or deficiency that existing alternatives don't. That comparison will continue to hold unless competitors address it. That's why investors look so heavily at growth rates: if you're growing 15x faster than your competitors, you're probably going to end up with the whole market, given enough time.

Re: Vue.js vs. React

#173
post #165

Earlier quoted context omitted.

> First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. here here! This has been my experience as well

*hear hear! ;)

In fairness, it is entirely possible that the parent was correctly indicating the location of a salient / appreciated point in this discussion thread ;)

Re: Vue.js vs. React

#174

Earlier quoted context omitted.

JSX is closer to JS than HTML, which means it annoying to write in some cases. Quick, what does this render as? Link 1 | Link 2 | Link 3 It's not Link 1 | Link 2 | Link 3 as you'd expect - instead, the whitespace after the pipe character is eaten by JSX. This is because HTML is whitespace sensitive, but JS is not, and so to allow indentation, JSX trims whitespace. Here's another - { Object.entries(definitions).map(([…

If you want whitespace, the proper thing to do is to use   HTML entity.

No, that has other implications.

Re: Vue.js vs. React

#175
post #61
post #40

Earlier quoted context omitted.

This whole "React is complicated" is a strawman. How is JSX more complicated than any template language? How are Vue components any simpler than React components?

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.

What kind of webapp are you writing where adding a compilation step adds too much complexity? I get if you're writing an application that's 95% static with a few moving pieces, but otherwise that argument doesn't hold much weight for me.

Re: Vue.js vs. React

#176
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…

I have been building web apps for 19+ years. I like many of the frameworks out there but for some reason I HATE React. I think JSX is a huge turnoff for me. I just can't get past html in javascript. It feels wrong.

With that said, there are so many VERY smart people embracing React, so I am always questioning my "hate". Maybe one day I will change my mind.

I haven't use Vue but watched/read about it and seems very cool and simple to use.

For now, my favorite framework by far is Ember JS and it really blows my mind why it is not the most popular framework out there. The amount of stuff you get out of the box and the incredible productivity and happiness it brings to the developer experience is IMPRESSIVE. It will take you 2 weeks of work to make a new React app have the same feature set as an Ember app*

* I could be wrong.

Re: Vue.js vs. React

#178

I know this is about Vue vs React, but a lot of the things people are saying they like about Vue can be found in Google's Polymer. It's very simple to comprehend and you can make single file components. And it's based on W3C standard web components so you won't be building yourself into future obsolescence. With Polymer 2 components are now built using classes, so your code is clear and 100% native JS. Lastly, the go…

I've used polymer and I wasn't impressed. I found it was much slower than Vue and the docs left a lot to be desired.

What was slow about it? Depending on how you use template binding, it should be as fast as anything else.

Re: Vue.js vs. React

#179
post #132

We moved away from React to Vue about 8 months ago and everyone on the team is a lot happier. First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. It also forces you to use a lot of boilerplate like bind(), Object.keys(), etc. Another problem with React is that it only really solves o…

> It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading

What does this mean? I have a sneaking suspicion this is a symptom of poor separation of concerns.

Re: Vue.js vs. React

#180
Maybe a bit off-topic, but not so much IMO.

Everyone talks about react, angular and vue.js. How about Polymer?

What are your experiences with it, if any? I'm no expert in either technology, but Polymer seems much more lean, needs no build process as far as I know, and is quite flexible.

Why wouldn't it be an option to replace react/angular/vue? Any thoughts?

Post reply on HN