Live data from Hacker News

Vue.js vs. React

vuejs.org

411–420 of 486 posts

Re: Vue.js vs. React

#411

Earlier quoted context omitted.

CRA or Next.js make bootstrapping incredibly simple, and they're production ready.

Bootstrapping matters more for the сurious and not very experienced individuals, think like Vue is a new jQuery.

It's not uncommon to have Node installed, and it's to easy install if you don't.

But if you find value in dropping in a CDN link, you can use React and Babel that way too.

Re: Vue.js vs. React

#412

Earlier quoted context omitted.

I have been building web apps for 19+ years. I like many of the frameworks out there but for some reason I HATE React. I think JSX is a huge turnoff for me. I just can't get past html in javascript. It feels wrong. With that said, there are so many VERY smart people embracing React, so I am always questioning my "hate". Maybe one day I will change my mind. I haven't use Vue but watched/read about it and seems very co…

Interestingly, I had recently joined a team that was using Ember, and we found that Ember hampered our productivity. We switched to React and was able to rebuild 4 months of Ember work in about 3 weeks of work in React (not sure how many developers were working on the Ember app originally, but it was mainly 2 of us who built the React app), including requisite tests. I’m of the opinion that Angular is much better tha…

Regarding state management, have you tried MobX? It makes state management almost ridiculously simple. I've noticed a slight performance hit using it for deriving values for 60fps animations on React Natuve but in normal usage you'd never notice.

Re: Vue.js vs. React

#413

In a way VueJS is "React for those who liked Angular1". I've done many Angular apps. I've done a bit of React (with Reflux & Browserify). I tried moving to React/Redux/Webpack but it's not an easy task to grasp the whole thing. Webpack itself was close to make me throw the towel on side projects. I tried VueJS because of a job interview and quite liked it and got productive really fast thanks to good documentation an…

I feel like a broken record, but definitely take a look at create-react-app if you haven't already. Its extremely well documented and takes care of managing the 20+ dev dependencies that are typically associated with a project.

And likewise I feel like a broken record, but try MobX instead of Redux. Much quicker to get started.

Re: Vue.js vs. React

#414
post #146

Earlier quoted context omitted.

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

You can make it cleaner: Button

Doesn't make it either clean or pretty

Re: Vue.js vs. React

#415
post #146

Earlier quoted context omitted.

You can make it cleaner: Button

Vue allows you to use Pug syntax in your templates, so this can be even simpler: button(:disabled='isButtonDisabled') Button div(:id='`list-${id}`") form(@submit.prevent='onSubmit') a(@click='doSomething')

And Pug amkes this... cleaner and prettier than JSX? I'm afraid not.

And it's far from being simpler

Re: Vue.js vs. React

#416

Earlier quoted context omitted.

Haven't used VueJS but the obvious thing to me would be to do your data transformations before hitting the view code - separating view code from business logic. So is this really a problem?

You don't always want to transform data, sometimes this is merely a UI concern...as in filtering, sorting, etc.

Yeah, so filter and sort it before you hit the view (and by this I mean the markup jsx or whatever) code, and problem solved ;)

Classic MVVM pattern

Re: Vue.js vs. React

#417

Earlier quoted context omitted.

It looks way more complicated then jsx. Why invent v-if etc when JavaScript has those built in.

1) separation of html and js 2) shorter to write and simpler to read

> separation of html and js

That's the thing. You do not really separate js and HTML.

There's a weird extension to HTML. There-are JS-like expressions, JS expressions and bindings to outside JS code

It's also neither shoryer to write nor easier to read.

Re: Vue.js vs. React

#418

Earlier quoted context omitted.

When you make it so that (which is how everyone is writing Vue anyway) Button It gets really, really clear that anything not in {{ }}, or attribute not prefixed by @ or : is HTML.

What's the difference between :disabled and the regular HTML disabled? Same for ID, etc. How do strings differ from variable names? The only way I see that as being more "intuitive" is if you're familiar with other templating languages. JSX is far clearer: Button All you really need to know is everything between braces is plain JavaScript, and property names are camelCased.

...and property names are Javascript property names. Because, well, JSX is a very thin layer on top of Javascript

Re: Vue.js vs. React

#419

Earlier quoted context omitted.

Templates have always been nice for basic examples. But now what happens if you only want to show odd numbers in listItem? It's not obviously clear how to do that in this example. Then you start adding in filters or Angular pipes. And the syntax grows in complexity until it becomes unwieldy. If you know the basic rules of JS, you already know how to achieve this with JSX. There's no need to go read the docs.

Haven't used VueJS but the obvious thing to me would be to do your data transformations before hitting the view code - separating view code from business logic. So is this really a problem?

Sorry, I shouldnt have said 'business logic' here. I really mean separating presentation and presentation data.

Re: Vue.js vs. React

#420

Earlier quoted context omitted.

Bootstrapping matters more for the сurious and not very experienced individuals, think like Vue is a new jQuery.

It's not uncommon to have Node installed, and it's to easy install if you don't. But if you find value in dropping in a CDN link, you can use React and Babel that way too.

I'm not writing about my personal preferences, this was the key point:

> think like Vue is a new jQuery

Post reply on HN