News for hackers. Stuff that matters.
Re:Why I left React for Vue by crubier on Tuesday December 25, 2018 @10:03PM (#18760199)
I disagree with everything in this article, except maybe about saving a few kb in bundle size, and the better CSS experience.

Everything else is biased and mostly wrong. In terms of performance, recent versions of react with Fiber can achieve figures vue can only dream of.

The conditional in react is just pure JS. He could have written an if statement instead of the anti pattern use of && for a non Boolean expression. And arguing that the v-if followed by code in a string is simpler sounds dishonest to me. Or we don’t have the same frame of reference.

The main problem to me is that the author compares his experience with react in 2015 with his experience in Vue in 2018.

Re:Why I left React for Vue by thatswrong0 on Tuesday December 25, 2018 @10:33PM (#18760305)
And benchmarks don’t tell the whole story.. the React devs have made it clear that they don’t optimize for benchmarks where you insert / delete a ton of rows, but instead for fluid user experience. There’s more to performance than editing rows.

And the numbers in that table are close enough to be meaningless anyways

And yes, Fiber is gonna be the bees knees

Re:Why I left React for Vue by DatBear on Thursday December 27, 2018 @03:58PM (#18772586)
The numbers are close enough to be meaningless, as is the benchmark. Your users won't be able to read 10 rows in the difference in time it is from react to vue's rendered rows, much less 10,000...
Re:Why I left React for Vue by TearsInTheRain on Tuesday December 25, 2018 @11:40PM (#18760566)
I've never used vue but that v-if thing looks like a terrible idea to me. I want my javascript to look like javascript, not hidden in the attribute of an html component... v-if is less readable imho
Re:Why I left React for Vue by sireat on Wednesday December 26, 2018 @07:42AM (#18761870)
With React I feel like I am writing Javascript in a nice functional style and I get to use all the cool new JS features.

with Vue I am writing ..Vue which does not feel right coming from a heavy Javascript background.

My bias is that I've written a ton of embedded Javascript(old Spidermonkey) for embedded devices.

I hear that Vue is more popular for those who have less JS experience.

Re:Why I left React for Vue by themoat on Wednesday December 26, 2018 @10:45AM (#18762666)
When I first started dabbling in front end code about 3 years ago, Vue really was easier for me to jump into. But part of that was the react didn't really have the simplest tutorials or articles on making a simple stupid page in the way that made logical sense to me.

Everything started with "Start with your webpack file" and I wanted to just swear off front end forever.

So vue was a breath of fresh air at the time. Then I started at a company where react was the norm and I can't imagine going back to vue at this point.

Re:Why I left React for Vue by sfifs on Tuesday December 25, 2018 @10:47PM (#18760367)
> He could have written an if statement Yes that's where the article lost me. It's almost as if the author is trying to intentionally use non obvious syntax in JS to show the other framework in a better light.
Re:Why I left React for Vue by stevev on Tuesday December 25, 2018 @10:57PM (#18760405)
Funny, I’ved used react and agree with everything in the article.
Re:Why I left React for Vue by molszanski on Tuesday December 25, 2018 @11:27PM (#18760515)
It is. What where the top reasons for liking Vue more? Or it is it more a generic thing?
Re:Why I left React for Vue by sergiotapia on Tuesday December 25, 2018 @10:45PM (#18760359)
>The conditional in react is just pure JS.

Who cares? You still write a JS conditional in the v-if string, right?

Re:Why I left React for Vue by crubier on Wednesday December 26, 2018 @05:59AM (#18761600)
> Who cares?

Me. As a CTO I am not confortable having significant amounts of code embedded in strings inside html attributes. Also we use Flow / Typescript.

React is typesafe and sound. No templates, no strings, just functions. This is the basis of the pyramids of developer's needs.

Re:Why I left React for Vue by sergiotapia on Wednesday December 26, 2018 @11:38AM (#18762987)
> This is the basis of the pyramids of developer's needs.

Apparently not though, thousands of people use Angular, even more people use VueJS now.

Re:Why I left React for Vue by crubier on Wednesday December 26, 2018 @01:00PM (#18763489)
> thousands of people

Animals*. Not people, FTFY.

Joke aside though, I think this is an artifact of old school web development, which was a mess. People didn’t mind these kinds of hacks. But the number of people willing to accept such incongruities is going to go down in the next years as web development has now normalized into more sane practices that are standard in the software development world.

Re:Why I left React for Vue by MattRix on Tuesday December 25, 2018 @10:53PM (#18760391)
That gets messy fast though. You start having to escape strings in your code, and potentially have a trickier time with autocompletion etc.
Re:Why I left React for Vue by kangoo1707 on Tuesday December 25, 2018 @11:03PM (#18760428)
then write a method for it.

Instead of v-if="currentUser && currentUser.id && ..." you can just write v-if="canDoStuff(currentUser)"