A Morning with Vue.js
I’m a React person but I’m not devoted to it. Honest! Earlier this week I found a morning to flirt with Vue.js.
My intention was to pen an article comparing the two frameworks. Upon reflection it feels somewhat pointless. Like React, Vue is primarily “focused on the view layer”. And like React, Vue does a pretty good job.
There are, of course, objective differences. You’ll find those documented elsewhere. In practical terms, the choice is largely one of personal preference. At least for the stuff I build.
Templating in Vue
I can see why many find Vue more approachable as their first framework. Vue templates sure do look more intuitive. React’s JSX isn’t as easy to pick up and play with. For me JSX just kinda clicked once I understood I was writing functions (not HTML). After a fair amount of coding I’m finding Vue’s directives rather cumbersome. Admittedly, perception and reality are different. The templating logic is likely as powerful but I prefer React in this area, despite the learning curve. Regardless, it’s very subjective and difficult to explain such a preference. Hence my hesitation to compare the two frameworks much further.
I suspect once you understand the broader concepts of one framework the second is easier to learn. Or maybe Vue is just easier to learn?
At their core both React and Vue do a more than acceptable job as user interface frameworks. Things really differ when you apply logic on top. For that there are multiple and common approaches. Neither framework is overly prescriptive. That’s a good thing; flexibility. That’s why I like both. They focus on one thing and do it well.
The worst thing about either framework are its users. By that I mean such tools are easily and inevitably misused. Which in turn leads to muddied and fruitless comparison. On that note, I’ll avoid sharing another over-engineered project. My quota for the month has run dry.
So when it comes to asking “React or Vue?” — that’s more of a people question; less of a technology one.
Given my years with React vs days with Vue, I’ll not be jumping ship. However, should a project demand Vue I’d be happy use it.