News for hackers. Stuff that matters.
Re:Vue.js vs. React by keyle on Saturday August 19, 2017 @09:47AM (#15053306)
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.

Re:Vue.js vs. React by noir_lord on Saturday August 19, 2017 @09:59AM (#15053385)
> If you want a full blown huge application to last years, then go Angular.

After what they did with Angular 1 -> 2 not a chance.

At least with Vue you can swap it out a lot more easily if it does go away in 3 years.

Re:Vue.js vs. React by ergo14 on Saturday August 19, 2017 @10:52AM (#15053690)
Right now a great option with "forward-compatible" applications would be to go Polymer.
Re:Vue.js vs. React by noir_lord on Saturday August 19, 2017 @11:38AM (#15053961)
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.
Re:Vue.js vs. React by Andrex on Saturday August 19, 2017 @01:51PM (#15054627)
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 library I've been looking at has been Xtag.

Re:Vue.js vs. React by ergo14 on Saturday August 19, 2017 @03:46PM (#15055203)
Does it make that much of a difference? My applications are still on 1.x, I did migrate my components to hybrid though. One other interesting libraries to look at are svelte or skatejs - haven't used them personally yet.
Re:Vue.js vs. React by Andrex on Saturday August 19, 2017 @03:52PM (#15055237)
I haven't used either extensively so take it with a grain of salt, but my anecdotal experience is that Polymer v1 at release vs. Polymer v2 in the latest Chrome is a massive world of difference.

I also think v2's switch to ES2015 classes instead of v1's prototypal inheritance is much better and cleaner, but that's more of a product of Web Components v0 vs. v1. :)

Re:Vue.js vs. React by ergo14 on Saturday August 19, 2017 @11:42AM (#15053983)
You mean it hasn't catch on with the community or it hasn't progressed as a technology?
Re:Vue.js vs. React by noir_lord on Saturday August 19, 2017 @12:16PM (#15054154)
The former, no idea on the latter.

I tend not to pay serious attention to technologies until they are popular and have been used for a while (I always adopt on the back side of the hype/productivity curve, since I'm not completely a front end developer).

Re:Vue.js vs. React by ergo14 on Saturday August 19, 2017 @12:20PM (#15054171)
Yeah, certainly it doesn't seem to get love here on HN.

However now https://www.webcomponents.org/elements has over 1k elements and Polymer slack channel is over 8k users, the community is active and there are lots of enterprise users adopting it (Netflix, IBM, GE, EA - not only Google).

IMO while that is not bad at all, react is obviously more popular, but when we talk about hype driven development - VueJS is one man project as you can see on GH, 99% of code is by single contributor - but based on hype you would feel safe adopting it.

Re:Vue.js vs. React by noir_lord on Saturday August 19, 2017 @04:05PM (#15055296)
Not sure I would tbh, I've been looking at Vue for the last 6 months as a replacement for Knockout and I still haven't bit the bullet, going to have to soon though because I need to give the frontend at work a good kicking and I have to pick something, thanks for the info on Polymer.
Re:Vue.js vs. React by ergo14 on Saturday August 19, 2017 @04:44PM (#15055489)
A lot really depends on your tastes, I didn't like react and I have to work with it daily. I like Polymer and what I saw in Vue docs, but at same time Vue is one man project really so that was the main reason I did not go with Vue - I might try it for my next project just for fun.

I think you should just do a tutorial in them and pick what fits your brain.

I understand DOM and elements so Polymer it was natural pick for me, also interoperability with other frameworks/libraries was important factor, they want to be the jquery of webcomponents basicly. I made my bet on a solution that is baked in inside the browser, since webcomponents are W3C standard, and polymer is really small (20kb), it won't suddenly stop working for me the same as jquery work for billions of people.

Re:Vue.js vs. React by paulgrimes1 on Saturday August 19, 2017 @10:06AM (#15053415)
No application lasts "years" nowadays, so I'd suggest not go "go Angular" simply because it's Angular. The modularity and speed-to-productivity of Vue is the reason I choose it. Plus, the community is quite supportive; always nice.
Re:Vue.js vs. React by recursive on Saturday August 19, 2017 @11:20AM (#15053870)
I work near, but not directly on, an application that's lasted about 20 years so far. It's still actively maintained, and still making money. It's mostly written in vb6 and classic asp. Yes. Some applications far outside the hype cycle can last decades.
Re:Vue.js vs. React by barrkel on Saturday August 19, 2017 @01:27PM (#15054503)
I've been working on a large web app (SaaS, so you won't have heard of it and can't try it out) for the past 5 years, and it's one continuous history codebase using Backbone for UI. It's not going to get rewritten any time soon. I'd expect it to still be using Backbone or something very similar (perhaps switching out some rendering subtrees for Vue or React) in another 5 years.
Re:Vue.js vs. React by k__ on Saturday August 19, 2017 @10:02AM (#15053394)
React has multiple alternatives to JSX too.
Re:Vue.js vs. React by erichdongubler on Tuesday August 22, 2017 @10:40PM (#15078137)
I would also add that language additions like TypeScript are not REQUIRED, but one can use them without any additional tech stack concerns in their build pipeline. In other words, things that React and Angular suggest (almost seem to require, given that documentation is written for them) as tech stack recommendations are entirely left to your initiative.
Re:Vue.js vs. React by sotojuan on Saturday August 19, 2017 @10:45AM (#15053642)
I've never seen a SPA last "years" without some eventual rewrite or major change. The only sites I see last year are serveres rendered ones or very simple ones.
Re:Vue.js vs. React by barrkel on Saturday August 19, 2017 @01:29PM (#15054518)
You probably don't see them because complex web UIs aren't always consumer-facing. The ones you're familiar with are probably maintained by large corporations rather than specialist companies, and can more easily afford rewrites.
Re:Vue.js vs. React by dmitriid on Saturday August 19, 2017 @11:47AM (#15054006)
> 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 by yev on Saturday August 19, 2017 @09:00PM (#15056430)
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