5 ms·
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 mos
by crubier 8y ago
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.
- thatswrong0 8y agoAnd 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
- DatBear 8y agoThe 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...
- sergiotapia 8y ago>The conditional in react is just pure JS. Who cares? You still write a JS conditional in the v-if string, right?
- MattRix 8y agoThat gets messy fast though. You start having to escape strings in your code, and potentially have a trickier time with autocompletion etc.
- kangoo1707 8y agothen write a method for it. Instead of v-if="currentUser && currentUser.id && ..." you can just write v-if="canDoStuff(currentUser)"
- crubier 8y ago> 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.
- sergiotapia 8y ago> 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.
- crubier 8y ago> 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.
- sfifs 8y ago> 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.
- stevev 8y agoFunny, I’ved used react and agree with everything in the article.
- molszanski 8y agoIt is. What where the top reasons for liking Vue more? Or it is it more a generic thing?
- TearsInTheRain 8y agoI'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
- sireat 8y agoWith 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.
- themoat 8y agoWhen 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.