Vue.js JavaScript framework revs up rendering

Vue.js 2.0 supports server-side rendering, streaming, and component-level caching

Vue.js, which has been positioned as a rival to Facebook's popular React JavaScript library, has moved to a 2.0 release, featuring a redone rendering layer for better performance. The framework also is set to get a push in the mobile realm.

The upgrade to Vue, a JavaScript framework for building UIs, has a rendering layer that was rewritten using a lightweight virtual DOM implementation forked from the snabbdom library.

"On top of that, Vue's template compiler is able to apply some smart optimizations during compilation, such as analyzing and hosting static sub trees to avoid unnecessary diffing on re-render," Evan You, who has been the principal developer of Vue, said. "The new rendering layer provides significant performance improvements compared to v1 and makes Vue 2.0 one of the fastest frameworks out there." Also, version 2.0's template syntax remains mostly compatible with 1.0 with minor deprecations, said You.

The upgrade supports server-side rendering, along with streaming and component-level caching, for fast renders. Libraries and tools including vue-router, vuex, vue-loader, and vueify have updated to support version 2.0. Vue core, vue-router and vuex 2.0, for state management, all have TypeScript typings shipped in npm packages. The Vue team has provided a migration guide and a CLI migration helper.

You also said engineers at Chinese e-commerce company Alibaba were working on a project called Weex, to render components written in a Vue-inspired syntax into a native mobile UI. Eventually, "Vue-inspired" will become "Vue-powered," according to You. "We have started an official collaboration to make Vue 2.0 the actual JavaScript runtime framework for Weex," he said. "This will enable users to write universal Vue components that can be reused across Web, iOS and Android."

Join the TechWorld newsletter!

Error: Please check your email address.

More about Facebook

Show Comments
[]