Live data from Hacker News

Vue.js vs. React

vuejs.org

131–140 of 486 posts

Re: Vue.js vs. React

#131
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? ;)

Re: Vue.js vs. React

#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 one problem. There is no official React router and we hated using the unofficial react-router for a number of reasons. A lot of people end up using MobX too.

With Vue there is no need to resort to third parties for your essential blocks. It provides an official router and store called Vuex, which IMO blows Redux out of the water when combined with Vue's reactive data.

Vue docs are probably one of the best I've used. They provide technical docs, plus excellent narrative docs (guides) for all their projects (Vue, Router, Vuex, templates, etc).

I won't say that Vue is perfect, but we would never go back to React.

If you don't like Vue but want to get out of React, check out Marko, the UI library by Ebay. It's better in every way than Vue or React except that the community and ecosystem are almost non existent.

http://markojs.com/

Re: Vue.js vs. React

#133
post #66

Earlier quoted context omitted.

A very large number of people use React in the same way, linking to a cdn.

Could you explain your rationale? I highly doubt that a very large number of people are hand-writing render functions... I personally gave up on React and only picked it up several months later after finding out that using it with just a script embed was exceedingly painful.

You can include a babel script that compiles everything on load. There's a performance hit but people do it because it's easy.

Edit: more information: https://github.com/babel/babel-standalone/blob/master/README...

Re: Vue.js vs. React

#134
post #84

These are the things I find to be killer features of React and it's ecosystem: - React Native (I know there's Weex but it's not production ready, nor as feature rich) - Streaming server side rendering - React Relay (GraphQL integration) - JSX by default . VueJS pushes an Angular-esque template language where I have to learn new syntax, binding concepts, directives and conditional statements. - Corporate backing I've…

i was in the same boat as you regards to syntax but in 10 mins you will grasp everything about vuejs. of all the frameworks, vuejs has the simplest syntax to learn. its no where as complex as angular and way more elegant. also beats jsx in terms of making your code more cleaner and prettier. im never going back to jsx.

Which part of this is clean or pretty?

   Button
   
   
   
   
There are some redeeming qualities compared to say, Polymer. But it's neither clean nor pretty

Re: Vue.js vs. React

#135
post #96

Earlier quoted context omitted.

> Anyway, hopefully that justifies it somewhat - I think it was the right decision all things factored in. There's a lot of CSS trickery/hackery to make the type tester work (native support for advanced typography stuff is poor) so making it x-browser wasn't easy. The messaging to users of other browsers could probably be improved though :) It doesn’t even work on Chromium, in the same version as Chrome. There is lit…

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.

Re: Vue.js vs. React

#136

What's with the hate for JSX? I think handling HTML as data makes much more sense and is much more convenient than dealing with dumb templates or weird DSLs like Vue's or Angular's.

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(([…

It's funny you bash JSX, which is a very thin XML-like DSL on top of JS, and then turn around and claim that Vue's DSL is HTML

   Button
   
   
   
Something tells me JSX is the better DSL.

Re: Vue.js vs. React

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

[deleted]

Re: Vue.js vs. React

#138
I checked React, didn't like JSX, then I find out about vue, and after an hour or two into its guide, I am completely hooked. Especially love the fact that you don't need a compiler, or a node installation. Although single file component looks very nice, I don't want to "bring in a whole jungle just to have a banana".

Re: Vue.js vs. React

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

I really don't want Vue to become another React. React used to be a single dependency in the browser and now it is difficult to find examples and discussions that don't require downloading npm and all these other components.

Re: Vue.js vs. React

#140
The single best argument for vue is that we should not support large internet monopolies. vue is so awesome even more so once you realize that it is basically driven by a single person
Post reply on HN