Live data from Hacker News

Vue.js vs. React: what happened in 2017

pixeljets.com

141–150 of 177 posts

Re: Vue.js vs. React: what happened in 2017

#141

Coming from Angular, I'm biased towards entities declared in the form of a class. It's a style that is easy to manage and familiar to most programmers. Vue currently seems to be a mix bag of styles. My take away from the little that I dabbled: - You need the vue-class-component dependency in order to declare class based components, otherwise, you're stuck with the awkward object literal notation - For state managemen…

I couldn’t disagree more. Unless your team have Super in depth knowledge of angular then it’s the wrong choice. It’s defaults to progagate changes cause rendering perf issues that are so frustrating to fix. Out of the box react or vue performs better than angular hands down. I hate that after learning angular 2 I realise I should not followed tutorials and advice and just switched all the defaults off on classes and manually propagate changes when required cos it’s a painful task to do.

Re: Vue.js vs. React: what happened in 2017

#142
post #75
post #59

Earlier quoted context omitted.

It is similar, but it will mean you get off the highway of React "preferred way" - for example, in case you start working with React Native you might have an issue of using different state management solutions for your web and mobile stack - it looks like nobody is using Mobx with RN in serious projects.

Actually we use React+mobx on both our web and RN stacks and it's been great. What we really like is that it is simple and extremely performant since in most cases it automatically updates only the React components that need to be re-rendered based on the state that's been modified. We jumped directly from a flux-like state management to mobx (skipping Redux) and the development time has gone down significantly as we…

Cool! I think you guys should do a writeup since "react native mobx" results in google clearly state the mind share is not there yet.

Re: Vue.js vs. React: what happened in 2017

#143
post #58

Earlier quoted context omitted.

Huh? OP said the power of the React ecosystem and change in license will keep it on top in 2018 and that if they were starting from scratch they probably would have used React for their website.

> next year would be the year of Vue.js success > Vue.js will be dominating only in the web OP did not say they would've used React given the choice, they said it would have made some things simpler Your reading and subtle re-wording of OPs comments misrepresent what OP actually says. > our stack would be simpler if we chose React.js for the web. We definitely do not regret choosing Vue.js for web, read more in my pr…

> Synergy, my friends, is the key to React upcoming monopoly.

Re: Vue.js vs. React: what happened in 2017

#144
post #98
post #87

Earlier quoted context omitted.

"Template language... You can call it 'separation of concerns' all you want, but just let me generate templates using the language I already know, JSX is great" Not everyone knows JSX, so while that argument applies to you, it doesn't apply in general.

They mean javascript; jsx is a very small amount of new syntax and is embedded in normal javascript. Learning a completely separate template language with all of its own constructs for conditionals, iteration, etc. is significantly more work.

> and is embedded in normal javascript

Exactly! I don't know, but I've always found that disgusting. It turned me off React when I first saw it, and it still does.

Then people use it to defend react, and I'm just like 'Lolwut? Did we spend years learning that SOC is a good thing only to throw it out of the window?'

I'll be the first to admit that any Vue template quickly becomes soup as well, but at least it's only half of the soup.

Is it just younger developers that think React is the best thing since sliced bread?

Re: Vue.js vs. React: what happened in 2017

#145

Earlier quoted context omitted.

Not necessarily.. I wonder had react not been backed by FB, it certainly would have had a beating in its popularity given lighter and arguably faster alternatives like vue. Remember, performance was one of the main argument React had when compare to Angular. Now since performance is no more a differentiating factor, developers might look into other aspects like better ROI in short and long term..

Just as one anecdotal data point, we didn't choose React for its performance when evaluating tools for our recent projects. (React can still be orders of magnitude slower than localised direct DOM updates on demand, after all, and in cases where performance really matters that might still be what you have to fall back on.) The game-changer with React is that it presents a declarative way to specify your DOM content,…

Could be for you, but have you wondered if React was say way slower than Angular and heavier, the adoption would have been much much lower?. Agreed, the model that React brought is superior but the catalyst was performance. They even highlighted performance as the main selling point with introducing the virtual dom, where the computation (dom querying) happens not in the dom but in the javascript, which is arguably faster and only differential updates are applied to the actual dom.

In my friend circle everyone wanted/were using Angular.js but it was too heavy for actual production use while react showed much better performance in the benchmarks (almost closer to Dom).

Re: Vue.js vs. React: what happened in 2017

#148
post #98

Earlier quoted context omitted.

They mean javascript; jsx is a very small amount of new syntax and is embedded in normal javascript. Learning a completely separate template language with all of its own constructs for conditionals, iteration, etc. is significantly more work.

There’s not any more to learn vs html than jsx. It’s like 5 relevant constructs that all follow the same form, and the colon. Takes 20 minutes to have it down pat. v-if is actually a big reason I prefer Vue. Ternary operators in JSX are pretty ugly. The other is that Vuex just feels so perfectly integrated. I've never felt Redux blends in particularly cleanly, though I certainly don't judge people that do prefer it.

Ternary operators in JSX are valid javascript expressions. As is anything that goes into {}

All of the following is neither Javascript nor HTML:

    v-for=”x in list”
    v-if=”conditional”
    v-on:click=“function”
    v-bind:key=“something.id”
etc. etc. etc.

Re: Vue.js vs. React: what happened in 2017

#149
post #144
post #98

Earlier quoted context omitted.

They mean javascript; jsx is a very small amount of new syntax and is embedded in normal javascript. Learning a completely separate template language with all of its own constructs for conditionals, iteration, etc. is significantly more work.

> and is embedded in normal javascript Exactly! I don't know, but I've always found that disgusting. It turned me off React when I first saw it, and it still does. Then people use it to defend react, and I'm just like 'Lolwut? Did we spend years learning that SOC is a good thing only to throw it out of the window?' I'll be the first to admit that any Vue template quickly becomes soup as well, but at least it's only h…

JSX is a thin XML-like DSL on top of Javascript.[1] Unlike untyped strings with a custom parser of Vue, which require you to write something that’s neither HTML nor Javascript.

You can have as much separation of concern as you like with React.

[1] https://reactjs.org/docs/jsx-in-depth.html

Re: Vue.js vs. React: what happened in 2017

#150
post #41

Earlier quoted context omitted.

Agreed, it’ll take another paradigm shift to switch to something else.

Not necessarily.. I wonder had react not been backed by FB, it certainly would have had a beating in its popularity given lighter and arguably faster alternatives like vue. Remember, performance was one of the main argument React had when compare to Angular. Now since performance is no more a differentiating factor, developers might look into other aspects like better ROI in short and long term..

Angular came out of Google, so what ;)

React leads the pack in:

- consistently good DX

- it’s used at FB so all decisions they make are guided by their own practical needs: don’t break backwards ompatibility, don’t break tools, improve tools, create tools where none existed etc. etc. etc.

React team has a very pragmatic approach to development, and it shows.

Post reply on HN