Live data from Hacker News

Vue.js vs. React

vuejs.org

261–270 of 486 posts

Re: Vue.js vs. React

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

Having worked for a big company, one of the things that people look for in a framework is a tech giant like Facebook supporting it. One of the reasons why people are shying away from moving to Vue is because that it's completely community driven. Think about Angular's huge initial success - it had the backing of Google

i think we all learned that a huge company backing has no bearing to the success of the project.

just ask any ex-angular devs.

Re: Vue.js vs. React

#262
post #253

Earlier quoted context omitted.

I'm still to be totally convinced by single page components, the idea of mixing languages within a file just doesn't feel right. I think I'd prefer to have a component directory with HTML, JS/TS and CSS/SCSS files in.

Doesn't that depend on pipeline? I've been doing for polymer components with html css and js split into separate files. They get concatenated into single file in build process.

Not by default as far as I know. There's more info here, it's doable but not pretty.

https://github.com/vuejs/vueify/issues/35

Re: Vue.js vs. React

#263
post #189

Earlier quoted context omitted.

Another chart worth viewing: https://www.hntrends.com/2017/july.html?compare1=React&compa... Hiring is a lagging indicator, but I see React hitting a plateau the way angular did. I see Vue is on the cusp of takeoff. Time will tell if it fails to launch, but I'm seeing more interest in Vue at meetups than React. I think a lot of this has more to do with React's state management than licensing. One of the react develop…

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

Re: Vue.js vs. React

#264
post #259
post #193

Earlier quoted context omitted.

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…

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.

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

#265

I experimented a little bit with Vue. I was a little bit disappointed about two points: 1. I couldn't CSS style a Vue component. I find components very important and they should behave like HTML elements. It should be possible to write a element in Vue if that element didn't exist. 2. I find the state management Vuex somewhat an afterthought. Some people say you will know when you need state management, but I think i…

what? vue does all that. i don't think the op tried vue at all, lol.

Re: Vue.js vs. React

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

There's also some early/limited support of vue using nativescript, which is more mature than weex.

https://www.nativescript.org/blog/a-new-vue-for-nativescript

Re: Vue.js vs. React

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

  

  
  
  

  
    const App = () => Hello World;
    ReactDOM.render(, document.getElementById('root'))
  

Re: Vue.js vs. React

#268
post #153

Earlier quoted context omitted.

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).

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

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

#269
post #184

Earlier quoted context omitted.

Yes, there is a project called react-templates by Wix that does that. We used it, but once you start using libraries like that one or MobX, why even use React at all?

>We used it, but once you start using libraries like that one or MobX, why even use React at all? Well, you've got a point. I can realistically see some developers preferring to piece-meal their front end solution though, or build just the parts they need themselves. I like Vue, but the API seems enormous. I get that a lot of people like that about it, though.

I'm surprised to hear you say that Vue has a large API, because one of my reasons for adopting Vue was its small API. It allowed me to hold a mental model of the API in my head.

You can go through the entire docs in less than an hour and get down to business. I did not have this experience with Angular 1 (don't know about v2) or React.

Re: Vue.js vs. React

#270
post #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 o…

> It's like writing shitty PHP code without templates. For me, it's the other way around. I feel like you can still separate the logic and markup, but instead of the template engine syntax you can just JavaScript. From the top of my head, I can at least remember six template engines' syntax I've learned: Smarty (PHP), Mustache, Blade (PHP), EJS, Angular and another custom template engine. When I tried React I was so…

>I can at least remember six template engines' syntax I've learned...

TBH, in 2017, I'm not sure why we're still hand-generating HTML with any template language.

Instead, I'd really like to see a framework that gets away from the idea of HTML templating altogether and presents a true component/properties model on top of a canvas with flexible, property-driven layout options.

I think the intense UI-demands of progressiveness/SPAs expose the unsuitability of HTML for the task. But, simply because HTML is what we're stuck with browser-wise, there's no reason we have to think or work in HTML. Use tooling to abstract it away altogether and let a translator generate it.

Post reply on HN