Vue is a progressive JavaScript framework for building user interfaces and single-page applications, distinguished by its approachable learning curve, reactive data system, and component-based architecture. Unlike monolithic frameworks, Vue is incrementally adoptable β you can use it as a simple library for enhancing static HTML or scale to a full-featured SPA framework with routing, state management, and build tooling. The framework's reactivity system automatically tracks dependencies and updates the DOM efficiently when data changes, eliminating manual DOM manipulation. Vue 3.5 brought significant improvements including reactive props destructuring, useTemplateRef(), useId(), onWatcherCleanup(), deferred Teleport, and 56% memory reduction in the reactivity system.
What This Cheat Sheet Covers
This topic spans 23 focused tables and 197 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Reactivity Primitives
| Function | Example | Description |
|---|---|---|
const count = ref(0)count.value++ | β’ Creates a reactive reference for primitive values or objects β’ accessed via .value in scripts, auto-unwrapped in templates. | |
const state = reactive({ count: 0 })state.count++ | β’ Converts objects into deeply reactive proxies β’ changes to nested properties trigger updates β’ does not work on primitives. | |
const doubled = computed(() => count.value * 2) | β’ Creates a cached reactive value that only re-computes when its dependencies change β’ read-only by default; use getter/setter object for writable computed. | |
const count = toRef(props, 'count') | Creates a reactive ref for a single property of a reactive object, maintaining the reactivity connection to source. | |
const { x, y } = toRefs(state) | Converts all properties of a reactive object into refs, enabling destructuring while preserving reactivity. |