What are the main differences between Vue 2 and Vue 3?

Vue.js Fundamentals Basic 1–2 Yrs2–3 Yrs Conceptual 1 min read

Quick Answer

Vue 3 rebuilt reactivity on ES6 Proxy (Vue 2 used Object.defineProperty, which couldn't detect added properties or array index changes), added the Composition API, allows multiple root nodes (fragments), adds <Teleport> and <Suspense>, is faster and smaller, and has first-class TypeScript support.

The core change is reactivity — Vue 3 uses a Proxy, so it can detect properties being added to an object and direct array index assignments, which Vue 2 couldn't, and that's why Vue.set is gone. It also introduced the Composition API for better logic reuse, allows a component to have multiple root elements, and added Teleport for rendering outside the component and Suspense for async components. It's generally faster and smaller, and TypeScript support is built in. The Options API still works, so you can migrate a component at a time.

  • Reactivity: no more Vue.set; adding a property to a reactive object just works.
  • Global API changed: createApp() instead of new Vue(); plugins registered per-app.
  • Options API still fully supported — migration can be incremental.
  • Vue 2 reached end of life at the end of 2023.