Vue.js 2.0

Vue.js 2.0

Written by Dev Dojo on Oct 21st, 2016 Views Report Post

It was back in April when the Vue team started working on the new 2.0 version, and after 8 betas and 8 alphas, Vue.js 2.0 is finally here. With the new version, there have been significant modifications made to TypeScript typings, API design, and documentation.

So without further wait, let’s see what the new Vue.js 2.0 version has in store for us.

Better performance

Vue’s new and modified reactivity system is now able to exactly determine components that need to be re-rendered even in large and complex component trees.

This is all because the rendering layer has been completely rewritten with the help of a lightweight Virtual DOM implementation done through snabbdom.

Apart from that, the template compiler can also apply smart optimizations automatically which avoids any unnecessary diffing on re-render.

Support for Server side rendering

With the help of component-level caching and streaming, Vue.js 2.0 is able to support superfast server side rendering. Also, vuex 2.0 and vue router support server side rendering with client side state hydration and universal routing.

Render functions

Vue 2.0 still maintains and supports most of the template syntax compatible with 1.0 version. Though these templates are compiled into Virtual DOM render functions, developers can also directly author these render functions, if they need JavaScript flexibility. And, there is also support for JSX.

All libraries now support 2.0

All the official tools and libraries including vue-loader, vuex, vueify, and vue-router have been updated to now support Vue.js, and the libraries have received improvements as well.

Migrating to Vue.js 2.0

If you are still using the 1.0 version, it is an absolute no-brainer that you should be migrating to the 2.0 version. After all, Vue.js 2.0 is faster, better and more reliable.

But of course, the question you are thinking of right now is – How to migrate?

Luckily, there is a very extensive migration guide provided by Vue to quickly help users migrated to the 2.0 version.

In conclusion

There was a time when Vue was just a side project, but now it has become one of the strongest growth trends in JavaScript libraries, and it is widely adopted all over the world. With the new version, Vue.js is only going to grow.

Comments (0)