Live data from Hacker News

Vue.js vs. React

vuejs.org

341–350 of 486 posts

Re: Vue.js vs. React

#341
post #64

Earlier quoted context omitted.

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 questi…

That what people said about the early growth in windows phones too.

I literally remember standing there listening a microsoft rep tell me that 'When you don't have much market share, there's always room for great growth".

...just saying, you can spin the story however you like, but the fact is that Vue currently has a reasonably insignificant market share.

Beyond that, all we can do is speculate.

Re: Vue.js vs. React

#342
post #193

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.

The update from Polymer 1 (Web Components v0) to Polymer 2 (Web Components v1) was huge for both code simplicity and performance. I know that my huge hangup with Polymer was performance, but it was solved (mostly) by Polymer 2 (released last May.) I'd give it a second look, especially now that most of the major pieces of Web Components v1 are shipping natively in browsers. On the other hand, a lighter Web Components…

[deleted]

Re: Vue.js vs. React

#343
post #104

Another option that is interesting right now is Polymer 2.x if you haven't tried it recently, give it a shot. https://vuejs.org/v2/guide/comparison.html#Polymer There are some similarities shared between polymer and react/vue (personally only used react and angular 1.x before). I've built applications with it using polyfills and things worked just fine with legacy applications on IE10 + jquery interacting with web co…

I used Polymer 2 to build a couple of highly used internal web components recently. And I'm currently in the process of ripping it all out. Why? It's not technically Polymer's fault, but the performance and stability on iOS and Safari are complete crap. Often crashes the browser on both desktop and mobile.

Also, the Shadow DOM is one concept that I liked in theory and hated in practice. Made it very difficult to do very simple styling tasks that were accomplished easily with plain css and proper naming (e.g. having parent components provide default styles for child components).

The polymer bundler in 2.0 is a buggy mess (it's still in beta) and I couldn't find any decent way to use Webpack with Polymer.

Many other complaints about Polymer that I won't go into. It's way too green in my opinion and I'd recommend avoiding it for at least the near future.

Re: Vue.js vs. React

#344
post #199

Earlier quoted context omitted.

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 co…

For a long time, people have been saying "separation of concerns" to support the idea of keeping HTML, JavaScript, and CSS in separate files. The problem with that is that the document, application state, and styling is all highly coupled when dealing with web apps . Web pages which are content based are fine with these being separate, changes to one don't necessarily affect another. For web pages, the separation of…

Separation of concerns means put your styles in a tag rather than the style attribute of a tag, and behaviour in a tag rather than in an onclick/onhover/whatever on the tag.

Grouping logically related components together makes perfect sense (and this is coming from a backend Rails dev who thinks the rails directory structure is totally wrong as well).

Re: Vue.js vs. React

#345
post #127

One of the biggest things React has going for it, other than being maintained by Facebook and having a much larger community, is React Native. You can learn one web framework and now also make compelling, real native apps. To me those are both deal makers. Surprised I haven't seen this mentioned more in the thread.

Yup, the marginal convenience advantages to web apps are so minimal compared to the ability to write legitimate native mobile apps.

Vue.js and Angular are complete non-starters for me since they don't have native counterparts.

Re: Vue.js vs. React

#346

Earlier quoted context omitted.

Vue allows you to use Pug syntax in your templates, so this can be even simpler: button(:disabled='isButtonDisabled') Button div(:id='`list-${id}`") form(@submit.prevent='onSubmit') a(@click='doSomething')

I'm sorry but that is hideous. JSX is incredibly simple. Why would you do that to yourself and other devs?

Eloquently put.

Re: Vue.js vs. React

#347

Earlier quoted context omitted.

> Everyone stopped saying React is fun after Redux. From my understanding managing state is a fundamentally hard problem, and Redux just make it very explicit and avoid the confusion of a state living in multiple places. Did not try Vue but is the state management simpler?

way simpler. it's just Redux down to it's core minimum, which is really just an abstraction layer to setting variables.

Redux's core minimum is already pretty incredibly minimal; I have a hard time imagining things much more simple than that.

react-redux, which is neither redux nor the only way to integrate redux with react, is a bit more complicated but still not very complicated.

Re: Vue.js vs. React

#348
post #86

To me the whole idea of client-side HTML templates seems bad. They start out easy enough, but then they either limit you in power or introduce new and weird concepts to replace things that are easy, familiar and often better designed in the host language. Here is an example on which I'd love to be proven wrong: https://jsfiddle.net/j2sxgat2/2/ Its a generic spinner component that waits on a promise then passes off th…

or introduce new and weird concepts to replace things that are easy, familiar and often better designed in the host language. Oddly, that's exactly how I feel about the "{condition_expression && template_evaluation}" idiom in JSX.

Hmmm, I really like the terseness and obviousness of that approach, I use it all the time :)

I have sometimes been caught out by doing `{somearray.length && thing}` though, which leaves `0` hanging out there in the false case...

Re: Vue.js vs. React

#349
post #128

Earlier quoted context omitted.

or introduce new and weird concepts to replace things that are easy, familiar and often better designed in the host language. Oddly, that's exactly how I feel about the "{condition_expression && template_evaluation}" idiom in JSX.

Personally I prefer the ternary operator in those cases, however I think do expressions will fix most of the if/else awkward stuff: https://babeljs.io/docs/plugins/transform-do-expressions/

I'll use a ternary if I want something in the "else" case, but otherwise the `&&` / `||` approach is more readable to me (there's more to read in a ternary to figure out that there's nothing happening in the else case, whereas it's obvious with the boolean approach without reading further).

Re: Vue.js vs. React

#350
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.

> What makes me pick Vue in the end is the fact that there is no compiler needed Why are then Vue components written in .vue files and compiled to Javascript then? ;)

You don't have to use .vue files to actually write Vue[1].

.vue files are there for simple single file components[2].

[1]: https://jsfiddle.net/yyx990803/y91wy85p/?utm_source=website&...

[2]: https://vuejs.org/v2/guide/single-file-components.html

Post reply on HN