DEV Community

Discussion on: Vue over React just for the syntaxis? :(

 
cyberhck profile image
Nishchal Gautam

Of course no doubt about it, if someone doesn't know react nor vue, vue just might be easier to learn, but again it depends on user's background.

If he's a frontend developer, vue is easy to setup, you don't need a build tool, nothing, you can directly start using vue.

But if the developer is more comfortable with typed language, or he knows some javascript but he has more typed language background, then I still make case for React. Say whatever you will, even though vuejs has been written completely in TypeScript, the TypeScript experience is nowhere near React's standard.

With React, you do need to learn React's ecosystem, but developer doesn't need to learn a syntax for rendering a list of users (the v:for thing), with 100% TypeScript coverage, developer gets most help directly by using an IDE.

The thing I hated when I tried using Vue + TypeScript is the lack of TypeScript intellisense, so there was a prop definition and usage in a component, I try to Ctrl + Click on that prop to see how it's being used, how do I pass that, is there any other usage? It doesn't find it!

And when calling Vuex, you call mutation like this:

commit("increment")
Enter fullscreen mode Exit fullscreen mode

The string increment is just a field in your mutation, but why did it have to be stringly typed? I hate strings.

Yes vue makes it easy to write code, if that's what you need great! Vue away, but I'm not looking only for writing code, for me reading, modifying, maintaining and ability for 1000s of other developers being able to navigate through the code base is more important than writing, so I'd rather create reducer, write action creators and ensure everything has types, and deal with a little boilerplate.

Again, for smaller companies and personal projects, you don't need that, I just have a requirement where I don't want to remember anything about the framework, my IDE helps me at every step :)

Thread Thread
 
leob profile image
leob • Edited

Got it, I totally see your point, good argumentation especially when it comes to Typescript support.

TBH I have limited experience with TS, and that was only within ... React :-) ... I don't have any experience with TS in Vue so I'm totally blank there, I trust 100% what you say.

Just for the record, I'm not a Vue fanboy or whatever (I'm not a fanboy of anything because it goes against my principles), I've worked with both React and Vue, I was just pointing out a few things about Vue which you MIGHT see as a pro (but also as a con, depending on how you look at it).

P.S. I just came across this article on dev.to:
dev.to/nomoredeps/why-react-uses-i...

and I agree with the author - the way React does it (JSX) is conceptually WAY more elegant than Vue with its "special" template tags.

Thread Thread
 
cyberhck profile image
Nishchal Gautam

Thanks for the article, that says exactly what I mean, but never was able to explain in simple terms.