There is something that I think people tend to take falsely, when they see Vue for the first time. They think, “Ha, that is a toy. It’s not going to work for more powerful applications.” What they are misconstruing is Vue’s affinity to attract newcomers to it as being “too simple to be used for something complex”. It’s because it’s API, it’s way of doing things, is much more beginner friendly. This beginner friendliness starts with its CLI being a first class citizen, to the UMD version, for implementing it in existing projects, to it’s concepts, which make sense at any level of experience (except for the concept of slots maybe , which once learned, is amazing).
People say, Vue’s API and having to learn it up front is more complex than React’s. I say, in the beginning maybe. However, Vue’s bit of opinionation in this regard means a form of constraint and constraints are good in programming, as long as what can be done with it as a tool is flexible. Over time, these constraints mean code bases are similar and easier to reason about and require less “best practices”. Less best practices means better more stable code i.e. better quality and for sure, a lot less cognitive load over time.
I don’t know if you’ve noticed, but in Twitterdom, Evan You started a bit of a flurry, when he noted how he likes React hooks. Well, if you went to the React side of the ball park to find out why they came to life, you will find this article from Dan Abramov:
There is also this video, where hooks was presented as the solution to “what sucks in React” (remember, this is Facebook telling the world what sucks about React):
Those are some major problems. I’ve not seen these same issues in all of my time watching and listening to the Vue community. Maybe nobody has gotten to the size of Facebook yet, but still, I can’t imagine them being a Vue problem.
Yes, hooks have clear advantages over mixins, but I would say, because Vue didn’t go down the road of inheritance, and instead followed the mantra, “prefer composition over inheritance”, it could avoid most of those problems for the most part. And I truly believe, if your components follow SRP, issues with mixins are limited too.
Of course, React is now going back to functional components and with hooks, it solves it’s ugly problems. So, it is advancing. That’s a good thing. And if you watched that video, React is starting to look more and more like Vue. Hahaha!
At any rate. Both Vue and React are powerful reactive UI libraries. I still think Vue has advantages over React, because it does it’s job smartly, in a way that is simple, yet powerful. That is the ultimate goal in programming such a tool. React, to me, is less simple and maybe too powerful and that “too powerful” can be understood as, allows for too much crap. Which, as you can see, even Facebook found out about the hard way.