Live data from Hacker News

Vue.js vs. React

vuejs.org

461–470 of 486 posts

Re: Vue.js vs. React

#461

Earlier quoted context omitted.

That what people said about the early growth in windows phones too. I literally remember standing there listening a microsoft rep tell me that 'When you don't have much market share, there's always room for great growth". ...just saying, you can spin the story however you like, but the fact is that Vue currently has a reasonably insignificant market share. Beyond that, all we can do is speculate.

More that 9% and growing at more than 100% per year doesn't seem insignificant at all. Windows phone arrived briefly at just over 3% and then immediately declined. The comparison between vue.js and windows phone doesn't make sense at all.

> As of the third quarter of 2013, Gartner reported that Windows Phone holds a worldwide market share of 3.6%, up 123% from the same period in 2012 and outpacing Android's rate of growth.

Sound familiar? (and I assure you, that 3.6% is a whole lot more than a 135k measly installs a day).

:P

That's called 'unsustainable small scale growth'; and it's what you're seeing with vue right now.

A good year over year growth of 2 or 3% is far far far more compelling than a tiny 100% growth rate from nothing to nothing.

Look at chrome's history of growth and that's what you'll see. In fact, if you look at the long term history of all three, that's what you'll see with reacts growth as well: https://npm-stat.com/charts.html?package=react&package=vue&p...

Sure, maybe vue and windows phone are different beasts and they're difficult to compare... but the comparison to chrome makes zero sense either at this point.

This '100% growth' stuff is pure hand waving nonsense. Its obviously unsustainable.

The question is, can vue turn its current trend into a sustainable consistent growth and take on react? I dunno, but I can guarantee you the answer to that question is something that no one knows at this point.

Re: Vue.js vs. React

#462

Earlier quoted context omitted.

He is right taught. You are allowed to have all the logic you want in your presentation layer. As long as it is presentation logic this perfect. If it is "Business logic" then this is wrong. Have you realised than having a if statement is already "logic"? Template system that don't have if statement are absolute trash IMHO.

Ah ok. So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong. I don't know Vue.js, but in WPF I would have simply bound an ItemsConttol to the list of models. Stop. Finished. No presentation logic at all in the XAML file. WPF will automatically bind the correct DataTemplate to the specific ViewModel contained in the list. I would have never ever…

It's useful to separate mantra and intent, here. Yes, separation of concerns is a useful thing, but if you just take it to mean that no logic should ever be involved in your templates, you're taking it too far and unnecessarily complicating things. If a section of the page is scrollable or expandable, the scroll and expansion state (and event-handlers) clearly live in the presentation layer and don't belong in any of the data model. (They aren't the only examples, but they are ones that most people accept.)

Re: Vue.js vs. React

#463
post #244

Earlier quoted context omitted.

It's slightly less easy to read than ... But it means you don't have to learn a library's HTML API. Or when you want to loop through myList, but exclude a few particular items... you know how to write that in JS, but have no idea what to do in the mark up language. You could create a filteredList, but it's often not ideal

> Or when you want to loop through myList, but exclude a few particular items Easy, just create a computed property in Vue.

Yes, that's easy, but adding something to your model just because your view wants it rather seems like the cart driving the horse. If your view needs something that your model otherwise has no use for, then it does not belong in the model.

Re: Vue.js vs. React

#464

Earlier quoted context omitted.

He is right taught. You are allowed to have all the logic you want in your presentation layer. As long as it is presentation logic this perfect. If it is "Business logic" then this is wrong. Have you realised than having a if statement is already "logic"? Template system that don't have if statement are absolute trash IMHO.

Ah ok. So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong. I don't know Vue.js, but in WPF I would have simply bound an ItemsConttol to the list of models. Stop. Finished. No presentation logic at all in the XAML file. WPF will automatically bind the correct DataTemplate to the specific ViewModel contained in the list. I would have never ever…

> So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong

I don't really know JSX much and without a specific example this is pointless to discuss. But basically JSX is syntactic sugar over javascript. A ternary is just a "if" condition so I don't see where is the issue here. Are you really using a template language devoid of conditionals? Even mustache the "logic-less" template has a form of it.

> The XAML file, as the HTML layer, should be completely devoid of logic and should delegate the whole work to the underlying model

The role of the model is and has always been to handle /business/ logic not presentational logic. If you put your dirty presentational logic inside my models I can tell you I will /never never/ accept your pull request.

Re: Vue.js vs. React

#465

Earlier quoted context omitted.

Ah ok. So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong. I don't know Vue.js, but in WPF I would have simply bound an ItemsConttol to the list of models. Stop. Finished. No presentation logic at all in the XAML file. WPF will automatically bind the correct DataTemplate to the specific ViewModel contained in the list. I would have never ever…

> So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong I don't really know JSX much and without a specific example this is pointless to discuss. But basically JSX is syntactic sugar over javascript. A ternary is just a "if" condition so I don't see where is the issue here. Are you really using a template language devoid of conditionals? Even mu…

So let's recap.

* You don't know JSX

* You have no idea of the specific example posted in this thread that I'm speaking of

* You have no idea about WPF and what is a view model

But nonetheless you feel entitled to discuss about things in which you have zero knowledge. This is the JSX code posted in this thread:

{listOfThings.map(thing => thing.isX ? )}

Instead of this monstrosity in XAML would be like this:

But of course for you is better the JSX code. Luckily for me you will never have to review any of my pull requests, I seriously doubt that you can accept something that you don't understand.

Re: Vue.js vs. React

#466

Earlier quoted context omitted.

> So for you using a map with a ternary operator over a list of objects in JSX is perfectly fine and you can't see what is wrong I don't really know JSX much and without a specific example this is pointless to discuss. But basically JSX is syntactic sugar over javascript. A ternary is just a "if" condition so I don't see where is the issue here. Are you really using a template language devoid of conditionals? Even mu…

So let's recap. * You don't know JSX * You have no idea of the specific example posted in this thread that I'm speaking of * You have no idea about WPF and what is a view model But nonetheless you feel entitled to discuss about things in which you have zero knowledge. This is the JSX code posted in this thread: {listOfThings.map(thing => thing.isX ? )} Instead of this monstrosity in XAML would be like this: But of co…

I didn't have to go very far inside ItemsControl to see the example of the "presentation logic" you say doesn't exist. E.g.

https://msdn.microsoft.com/en-us/library/system.windows.cont...

What is that if not an horribly verbose switch case for modifying the representation of different elements passed to the ItemsControl?

I am not advocating that the JSX is particularly pretty or clever. I am objecting to your crazy notion that there should be no logic in the representation layer.

Re: Vue.js vs. React

#467
post #367
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…

> First reason is we hate JSX. I feel like this is often the reason people dislike React, and it mostly comes out of a misunderstanding of JSX and es6 syntax and interaction. Why do I say this? Because I've yet to hear an argument that came after a statement like above which was actually true in any way. Most arguments that come after actually expose the fact that the author of the statement simply doesn't understand…

Our team had the same thoughts on react-router. I'd suggest checking out https://github.com/kriasoft/universal-router. It uses the HTML5 History Library (https://github.com/ReactTraining/history) for navigation.

Re: Vue.js vs. React

#468

Earlier quoted context omitted.

Did not known about Kea, seems nice! However, there are no unit tests??

They are in src/__tests__

Thx, didn't see them at first. Since i like to complain: continuous integration and code coverage with nice badges are missing ^^

Re: Vue.js vs. React

#469

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.

It's useful but doesn't take care of state management AFAIK which can be a big part.

Re: Vue.js vs. React

#470

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…

If I was reading your post 3 months ago, I would completely agree with you. But learning React/Redux and Webpack is not that hard at all, just focus on one and move on to the next. WebPack is dead easy IMO, Redux is just an design concept, but it's easy to implement as well. I think sometimes developers over hype technology and make it sound incredibly hard, when in fact is just isn't.

React itself is simple but having a whole project with React/Redux and a full fledged Webpack/Babel config managing dev and prod build is really not simple IMHO.

And, once you have all that working, staying up to date without bugs due to version mismatches can be a real pain.

Post reply on HN