Engineering

Vue.js

A progressive JavaScript framework built on fine-grained reactive dependency tracking

Lead Summary

Vue.js is a progressive JavaScript framework for building user interfaces that centers its architecture on a reactive dependency-tracking system. Unlike frameworks that require developers to manually specify what to update or re-render, Vue tracks which reactive state properties are accessed during a render and automatically updates the relevant DOM when those properties change. This automatic, fine-grained approach has positioned Vue as a prominent member of the signals-based reactivity movement that now characterizes most major frontend frameworks as of 2026, and has given it a reputation for a gentler learning curve and a more cohesive default toolchain compared to alternatives like React.

Core Concepts

Proxy-Based Reactivity

At the heart of Vue 3 is a reactivity system built on JavaScript's Proxy object. When a data object is made reactive, Vue wraps it in a Proxy that intercepts property reads and writes. During a component render, every reactive property that is accessed gets registered as a dependency of that render. When any of those properties are later mutated, only the components that depend on them are updated — not the entire component tree.

This design resolves a key limitation of Vue 2's Object.defineProperty approach, which required wrapping each property individually and had notable gaps around arrays. Vue 3's Proxy-based system automatically tracks nested properties and array mutations — including standard array methods like push, pop, and splice — without any manual intervention from the developer.

Vue 2 vs Vue 3 reactivity

Vue 2 relied on Object.defineProperty, which had to wrap each property individually. It could not detect property additions or deletions and required special handling for arrays. Vue 3's Proxy wraps an entire object at once, automatically covering all properties, nested structures, and array mutations.

Automatic Dependency Tracking

Vue automatically registers dependency relationships without requiring developers to declare explicit dependency arrays. Any reactive property accessed inside a watchEffect, computed, or component render is implicitly tracked. When a tracked property changes, the effect re-runs or the component re-renders. This eliminates a common class of bugs found in frameworks that rely on manually maintained dependency lists.

Computed Properties and Derived State

Vue computed properties cache results based on their reactive dependencies and only re-evaluate when one of those dependencies changes. This distinguishes them from ordinary methods, which recalculate on every call regardless of whether their inputs changed. Computed properties are the idiomatic tool for derived state: they combine caching with automatic dependency tracking through Vue's reactivity system.

Per Vue's official guidance, computed properties should be pure functions — they should depend only on their reactive inputs, produce no side effects, make no API calls, and not mutate other state. Side effects belong in watchers or lifecycle hooks.

Two-Way Binding and v-model

Vue's v-model directive is syntactic sugar over a unidirectional props-and-events pattern. Under the hood, v-model passes a modelValue prop down from parent to child and listens for an update:modelValue event emitted upward, preserving the unidirectional data flow. The directive provides convenience — particularly for form inputs and interactive dashboards — without breaking the component communication contract.

V-model makes creating custom components that support two-way data binding convenient by abstracting the prop-event pattern.

This convenience comes with a performance caveat: deep watchers that must traverse all nested properties can become expensive, and developers working with complex nested state should prefer targeted watchers or restructure data to avoid deep observation.

Historical Development

From Options API to Composition API

Vue 3 introduced the Composition API as an alternative to the Options API found in earlier versions. The shift represents a mental model change: instead of organizing component code by option type (data, computed, watch, methods, lifecycle hooks), the Composition API allows developers to group related logic by feature. A composable that handles user authentication, for example, can contain its own state, derived values, watchers, and lifecycle logic all in one place, rather than scattered across five separate option buckets.

The Composition API aligns Vue's component model more closely with React's functional approach while retaining Vue's declarative template syntax and reactive data system.

Vue 3.6 and Vapor Mode

By early 2026, Vue's most significant architectural evolution in years — Vapor Mode — had reached feature-complete beta status in Vue 3.6 (v3.6.0-beta.6). Vapor Mode is a compilation mode that compiles components directly to DOM operations using fine-grained signals rather than routing changes through a virtual DOM.

Vapor Mode produces 2–3x faster renders by eliminating virtual DOM diffing overhead entirely. Components opting into Vapor Mode are compiled to imperative DOM instructions that update only the specific nodes dependent on changed signals, a strategy similar to SolidJS's architecture.

Vapor Mode stability

As of March 2026, Vapor Mode is feature-complete but still marked unstable. It should not be used in production without accepting potential breaking changes before the stable release.

Components & Structure

Templates and Single-File Components

Vue's template syntax keeps markup and logic visually separated, creating a familiar mental model for developers coming from HTML-based templating languages like ERB or Jinja2. A Single-File Component (SFC) consolidates template, script, and style in one .vue file, with each concern in its own clearly delimited block.

This contrasts with React's JSX, which merges markup generation and JavaScript logic into a single space. Vue's separation is more approachable for developers entering from traditional web development, while JSX's unified model offers more flexibility and explicitness at the cost of a conceptual shift.

Build tooling for Vue SFCs requires the vite-plugin-vue plugin, which gives Vite the semantic understanding needed to perform Hot Module Replacement while preserving component state across code changes.

Composables

Vue composables are functions that leverage the Composition API to encapsulate and reuse stateful logic. A composable like useUser or useApiCall can contain reactive refs, computed properties, watchers, and lifecycle hooks, then be imported into any component that needs that behavior. They follow a naming convention analogous to React's custom hooks and are typically organized in a composables/ directory.

This pattern maps cleanly to backend service-layer architecture: composables abstract data access and business logic away from rendering concerns, making components thinner and logic more independently testable.