2.0.8

Latest release in branch 2.0
Released 9 years ago (November 20, 2016)

Software Vue.js
Branch 2.0
Status
End of life
End of support (OSS) November 22, 2016
First official release version 2.0.0
First official release date 9 years ago (September 30, 2016)
Release notes https://github.com/vuejs/core/releases/tag/v2.0.8
Source code https://github.com/vuejs/core/tree/v2.0.8
Documentation https://v2.vuejs.org
Vue.js 2.0 Releases View full list

What Is New in Vue.js 2.0

Vue.js 2.0 is a major evolution focused on performance, rendering, and developer experience. It introduces a new virtual DOM-based renderer, a faster and leaner core, and powerful new features for building modern applications.

Category Key Changes
Core & Performance New virtual DOM renderer, faster component initialization, reduced memory overhead.
Template Compiler Static tree hoisting, static attribute hoisting, improved code generation for smaller bundles.
Server-Side Rendering Streaming SSR support, client-side hydration, and bundle renderer for built applications.
New Features Scoped slots, functional component improvements, directive hooks, and model option for custom components.
Breaking Changes v-for range syntax, filter usage outside interpolations, lifecycle hook changes, and removal of some APIs.

How does the new virtual DOM improve performance?

The core of Vue 2.0 is a new, lightweight virtual DOM implementation. This rewrite provides significant speed gains across the board. In practice, you get faster component mounting, patching, and overall rendering performance with reduced memory consumption.

The renderer is decoupled from the core, enabling targeted optimizations. This architecture matters because it allows for advanced features like server-side rendering and native rendering wrappers (like Weex) to be built on the same codebase.

What optimizations does the new template compiler offer?

The compiler underwent a complete overhaul to generate more efficient render function code. It performs aggressive static analysis on your templates to optimize the output.

Static Tree Hoisting

Elements that never change are hoisted out of the render function, created once, and then reused. This skips patching them on each re-render, which is a major performance win for large static chunks.

Static Attribute Hoisting

Static attributes on elements are also hoisted, reducing the cost of creating VNodes. The compiler output is generally leaner, leading to smaller bundle sizes and faster execution.

What's new with Server-Side Rendering in Vue 2?

Server-side rendering got a massive upgrade, becoming faster and more feature-complete. The new vue-server-renderer package supports streaming output, which can improve perceived performance for your users.

Client-side hydration is now built-in and more robust. The bundle renderer allows you to run pre-built bundles on the server, which integrates well with modern build setups and improves SSR performance by avoiding re-compilation.

What are the most useful new features for component authoring?

Several additions give developers more power and flexibility when building components.

Scoped Slots

This is a major feature that allows a component to expose data to its slot content. It enables highly reusable and composable component patterns, like list or table components where the parent controls the rendering of each item.

Functional Component Improvements

Functional components are now stateless and instanceless, making them much lighter and faster. They can now return an array of children, have optional props and children validation, and work seamlessly with scoped slots.

Directive Hooks & Model Option

Directives gain more fine-grained lifecycle hooks. The model option on components lets you customize which prop and event to use for v-model integration, cleaning up two-way binding on custom components.

What are the critical breaking changes to watch for?

Upgrading requires careful attention to API changes. Some syntax and behaviors from 1.x have been altered or removed.

  • v-for range: The syntax v-for="number in 10" now iterates 0-9 instead of 1-10.
  • Filters can no longer be used inside directives like v-model; they are now only for text interpolations ({{ }}).
  • Lifecycle hooks: attached, detached, init, ready are replaced by the created, mounted, updated, destroyed series.
  • Global Vue.set and Vue.delete are now instance methods (this.$set, this.$delete).
  • The events and Vue.elementDirective APIs are removed in favor of component-based patterns.

FAQ

Is Vue 2.0 significantly faster than 1.x?
Yes, the new virtual DOM renderer provides substantial performance improvements, especially in update scenarios and memory usage. Benchmarks in the release notes show multiples of improvement in common operations.

Do I have to rewrite all my templates for Vue 2?
Most templates will work without changes. The breaking changes are primarily in edge-case syntax (like v-for range) and API usage. The migration helper tool can identify many of these issues in your code.

What happened to two-way binding with .sync?
The .sync modifier for props was removed as it broke the one-way data flow pattern. The recommendation is to use explicit events or the new v-model customization for two-way communication on components.

Can I still use filters in my Vue templates?
Filters are still supported, but their usage is now restricted to mustache interpolations ({{ message | capitalize }}). You cannot use them inside directives like v-model or v-bind anymore.

Are functional components really that much better now?
Absolutely. In Vue 2, they are pure render functions with no reactive state or instance, making them incredibly lightweight. They are perfect for simple presentational components and can offer a noticeable performance boost when used appropriately.

Releases In Branch 2.0

Version Release date
2.0.8 9 years ago
(November 20, 2016)
2.0.7 9 years ago
(November 16, 2016)
2.0.6 9 years ago
(November 15, 2016)
2.0.5 9 years ago
(November 05, 2016)
2.0.4 9 years ago
(November 04, 2016)
2.0.3 9 years ago
(October 13, 2016)
2.0.2 9 years ago
(October 12, 2016)
2.0.0 9 years ago
(September 30, 2016)
2.0.1 9 years ago
(September 30, 2016)
2.0.0-rc.8 9 years ago
(September 27, 2016)
2.0.0-rc.7 9 years ago
(September 23, 2016)
2.0.0-rc.6 9 years ago
(September 13, 2016)
2.0.0-rc.5 9 years ago
(September 08, 2016)
2.0.0-rc.4 9 years ago
(August 29, 2016)
2.0.0-rc.3 9 years ago
(August 20, 2016)
2.0.0-rc.2 9 years ago
(August 16, 2016)
2.0.0-rc.1 9 years ago
(August 11, 2016)
2.0.0-beta.8 9 years ago
(August 10, 2016)
2.0.0-beta.7 9 years ago
(August 05, 2016)
2.0.0-beta.6 9 years ago
(August 01, 2016)
2.0.0-beta.5 9 years ago
(July 27, 2016)
2.0.0-beta.4 9 years ago
(July 26, 2016)
2.0.0-beta.3 9 years ago
(July 24, 2016)
2.0.0-beta.2 9 years ago
(July 17, 2016)
2.0.0-beta.1 9 years ago
(July 07, 2016)
2.0.0-alpha.7 9 years ago
(June 28, 2016)
2.0.0-alpha.8 9 years ago
(June 28, 2016)
2.0.0-alpha.6 9 years ago
(June 22, 2016)
2.0.0-alpha.5 9 years ago
(June 17, 2016)
2.0.0-alpha.4 9 years ago
(June 16, 2016)
2.0.0-alpha.3 9 years ago
(June 15, 2016)
2.0.0-alpha.2 9 years ago
(June 13, 2016)
2.0.0-alpha.1 9 years ago
(June 10, 2016)