I’m a big fan of Vue.js.
This post is not intended to say that using other frameworks is bad, or that you should switch all your existing projects to Vue. On the contrary, many incredible apps have been built by teams using React, Angular, Ember, and more! Each framework has unique pros and cons, and it’s important to consider what’s important to you and your team before settling on one.
A simple counter component, showing Vue’s basic syntax.
One of my favorite things about Vue is its small API surface area. This is awesome for a number of reasons. First, it means Vue is easy to learn. That’s great for onboarding new developers to a project. In my experience, developers new to Vue are often able to be quite productive after only a day or so. It also means that once you are familiar with Vue, you’re able to hold more of its API in your head, which means less time spent repeatedly looking things up in docs, and more space for your application’s business logic.
As of version 2, Vue weighs only 23KB minified + gzipped. That’s just over half of React’s 44KB, and significantly smaller than Angular at 125KB or Ember at 110KB. As the web trends towards smaller, faster apps, those size differences add up quickly. The Vue team has also shown a commitment to making sure all the tools in the Vue ecosystem stay small and fast. With Vue 2, you can even separate the template-to-virtual-DOM compiler and runtime. This means that if you precompile your templates (as many people do now), the base Vue package sent to the browser can weigh as little as 17KB.
Vue 2 is also much more performant than version 1, improving initial rendering speed and memory consumption by ~2-4x in most scenarios. Of course, internal improvement is great, but largely meaningless if Vue is slower than other frameworks. Thankfully, that’s not the case! In most scenarios, Vue outperforms React by a fair margin.
A simple rectangle calculator component, showing Vue’s computed property syntax.
If you’ve been thinking about trying Vue, now is a great time. It’s becoming increasingly popular, and version 2 has really made it a flexible, powerful option.