Live data from Hacker News

Vue.js vs. React: what happened in 2017

pixeljets.com

171–177 of 177 posts

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

#172

Earlier quoted context omitted.

it's pretty much the same change detection logic across all of these frameworks. Immutable data is key to performant change detection. Angular provides the ability to bind template to immutable state data so the framework can provide the most performant change detection

Except it's not the same across all these frameworks. If I build a grid with 15 columns and 3500 rows (actual issue faced) which contains 3 characters in a cell and a menu when clicking on the cell. Out of the box Angular took ~8 seconds to make it appear on the screen. Vue and React were both less than 1 second. If I changed the value of a cell, then Angular would redraw the entire grid, Vue and React just updated t…

>Changing it to 1 way binding resolved the rendering time and made it on par with the other 2,

You have to explicitly enable 2 way data binding in Angular 2.x +. Angular 2.x+ is 1 way data binding by default. This is a key differentiation between AngularJS 1.x and Angular 2.x+

The fact that you imply you had 2 way data binding initially means you were using angularJS 1.x (not Angular 2.x +) Or if the latter, you had some very poor design decisions to settle on a 2 way data binding solution. Vue and React both are by default 1 way data binding.

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

#173

Earlier quoted context omitted.

Except it's not the same across all these frameworks. If I build a grid with 15 columns and 3500 rows (actual issue faced) which contains 3 characters in a cell and a menu when clicking on the cell. Out of the box Angular took ~8 seconds to make it appear on the screen. Vue and React were both less than 1 second. If I changed the value of a cell, then Angular would redraw the entire grid, Vue and React just updated t…

>Changing it to 1 way binding resolved the rendering time and made it on par with the other 2, You have to explicitly enable 2 way data binding in Angular 2.x +. Angular 2.x+ is 1 way data binding by default. This is a key differentiation between AngularJS 1.x and Angular 2.x+ The fact that you imply you had 2 way data binding initially means you were using angularJS 1.x (not Angular 2.x +) Or if the latter, you had…

/facepalm

I WANT 2 way binding so I could achieve what I wanted to achieve.

The only way to get the performance out of angular 2 was to NOT use 2 way binding and hack it together.

Vue / React examples didn't suffer from 8 seconds of render time using 2 way binding on a large number of elements.

You can sit and defend angular 2 all you want, doesn't change the fact it's terrible.

Let's not even get into the angular api 2 changing after they said it wouldn't. And regressions of the angular cli, and breaking changes on minor updates.

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

#174

Earlier quoted context omitted.

>Changing it to 1 way binding resolved the rendering time and made it on par with the other 2, You have to explicitly enable 2 way data binding in Angular 2.x +. Angular 2.x+ is 1 way data binding by default. This is a key differentiation between AngularJS 1.x and Angular 2.x+ The fact that you imply you had 2 way data binding initially means you were using angularJS 1.x (not Angular 2.x +) Or if the latter, you had…

/facepalm I WANT 2 way binding so I could achieve what I wanted to achieve. The only way to get the performance out of angular 2 was to NOT use 2 way binding and hack it together. Vue / React examples didn't suffer from 8 seconds of render time using 2 way binding on a large number of elements. You can sit and defend angular 2 all you want, doesn't change the fact it's terrible. Let's not even get into the angular ap…

all performan comparisons out there have the three frameworks neck and neck. Your anecdote is certainly interesting in terms of the diffference in performance. I would chalk it up as poor implementation / understanding of angular, rather than some special edge case that tested the limitation of angular

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

#175
post #5

I’m the founder writing code (but not the only technical person) for my three person startup. In October I started migrating our MVP from server side templates to Vue, given we had direction and traction on a product line that justified the time investment. It’s turned out to be a great decision (although likely one that could have been made with react as the choice as well). My “success story” is how Vue helped me t…

I'm assuming you used Rails as a back-end?

The reason I'm asking is that I've been diving into Elixir and Phoenix, and I'm wondering if the difference in speed between those two would obviate the 'need' for React/Vue (or even be a faster solution). I'm a front-end dude, so no 'enemy' of those, but I keep finding myself preferring an Elixir-based (and thus server-side) solution because it's just such a nice language and so convenient to not have to switch for significant logic.

For example, the fact that {} in js is a map/object, where in Elixir it is a tuple (a map would be %{}) keeps tripping me up, and it makes me generally either lean toward mostly server-side with some basic js snippets (Turbolinks style), or alternatively mostly client-side (React/Redux) with a 'dump' api backend in Elixir.

At this point I'd really love to lean toward the server-side, but stories like yours make me wonder about that leaning.

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

#176
Any suggestion for the below use case? Whether to use Vue or React?

- I develop APIs and plan to hire freelancers to do the web/mobile clients (so, higher availability of skills in the market is important to me)

- I have a web designer developing the UI with just plain html/css. And this is going thru multiple iterations and the web-designer is able to make all the changes (cheaper because this is just a web-designer, not a programmer).

- Once, the UI is finalized (and fully designed with html/css), I plan to hire a Javascript programmer to do the SPA front-end (so, being able to use existing plain html/css templates with minimal change is a big benefit).

- I do not plan to create native mobile client, just a hybrid app based on webkit. If the web app was developed with React, then will it benefit the mobile clients to be developed with React Native? or, does it matter at all? If Vue.js was used for SPA webapp, what do the Vue programmers use for mobile client? I assume React guys might naturally use React Native.

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

#177

Earlier quoted context omitted.

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

React and Angular are solutions to different problems. I don't think React would have succeeded without adequate performance, but I also don't think it is why React has been successful or the main reason it has displaced some of Angular's "market share"; being fast enough is necessary but not sufficient to do its job.
Post reply on HN