💚 Learn Vue.js — Engineering Reference

A production-grade Vue 3 curriculum built for mid-level developers moving to senior roles. Every chapter is code-first: dense, annotated examples covering complex implementations, anti-patterns, edge cases, and production tips. No tutorial fluff — just the patterns, traps, and internals that real codebases depend on.

How to Use This Reference

  1. Jump to a chapter as a reference when you hit a concept in production code.
  2. Read the anti-pattern sections before refactoring — see the wrong way, then the right way.
  3. Solve the Spot the Bug challenges at the end of each chapter to test your understanding.
  4. Build the capstone projects in chapter 24 to apply the patterns in a real app.

Prerequisites

  • Solid JavaScript (ES2015+): closures, destructuring, modules, promises, Proxy.
  • HTML & CSS fundamentals.
  • TypeScript basics (generics, interfaces, union types) — chapters use <script setup lang="ts">.
  • Node.js LTS installed.
  • VS Code + the Vue - Official (Volar) extension.

Curriculum

Part I — Foundations & Reactivity

#TopicWhy It Matters
01Introduction & SetupProxy reactivity internals, createApp isolation, SFC compilation pipeline, multi-instance mounting.
02Template Syntax & DirectivesCompiler patch flags, keyed vnode diffing, modifier chains, v-model expansion, v-if/v-for precedence.
03Reactivity FundamentalsTrack/trigger dependency graph, ref vs reactive, destructuring trap, toRef/toRefs, shallowRef, customRef.
04Computed & WatchersComputed dirty flag caching, watch vs watchEffect, flush timing, deep watch cost, race condition cleanup.
05Components BasicsdefineProps/defineEmits/defineExpose macros, prop validation, attr fallthrough, async components, defineModel.

Part II — Component Architecture

#TopicWhy It Matters
06Component CommunicationProps down/events up contract, provide/inject with typed InjectionKey, $attrs forwarding, multi-v-model.
07Composition API In Depthsetup() vs <script setup>, composable patterns, module-scoped singletons, effectScope cleanup, async setup.
08Lifecycle HooksFull lifecycle sequence, onMounted DOM init, onUnmounted cleanup, KeepAlive activation, onErrorCaptured boundaries.
09Forms & v-modelModifier internals, .lazy/.number/.trim edge cases, schema validation, custom inputs, debounced search.

Part III — State, Data & Routing

#TopicWhy It Matters
10State Management with PiniaSetup vs options store, $patch batch mutations, cross-store deps, persistence plugin, SSR hydration.
11Routing with Vue RouterLazy loading + code splitting, guard composition, scroll restoration, beforeRouteUpdate, typed routes.
12Fetching Data & AsyncAbortController race prevention, request deduplication, SWR pattern, pagination, optimistic updates, Suspense.
13Slots & Scoped SlotsDefault/named slots, scoped slot data passing, renderless components, slot compilation, conditional slots.

Part IV — Advanced Patterns

#TopicWhy It Matters
14Dynamic & Async Componentscomponent :is, defineAsyncComponent states, KeepAlive LRU caching, shallowRef for component refs, Suspense.
15Custom DirectivesHook lifecycle (created→unmounted), directive binding shape, v-lazy with IntersectionObserver, v-copy clipboard.
16Teleport & SuspenseTeleport stacking context escape, disabled prop, nested Suspense boundaries, async error handling, SSR-safe teleport.
17TypeScript with VuedefineProps generics, defineEmits signatures, InjectionKey typing, generic composables, template type narrowing.

Part V — Production Engineering

#TopicWhy It Matters
18TestingVue Test Utils mounting, effectScope for composable tests, Pinia store mocking, async test patterns, flushPromises.
19Performance OptimizationPatch flag compiler hints, v-memo for large lists, shallowRef for big data, v-once, manual chunk splitting.
20SSR & Nuxt BasicsHydration lifecycle, onServerPrefetch, state serialization, hydration mismatch causes, Nuxt useFetch, SSR-safe composables.
21Build Tooling & ViteHMR internals, plugin pipeline, env variables, CSS scoped/modules/preprocessors, production build optimization.
22SecurityXSS auto-escaping vs v-html, DOMPurify sanitization, CSP configuration, credential handling, content security.
23Design PatternsStore pattern, renderless components, composable composition, provider/consumer DI, observer event bus, feature modules.
24Exercises & ProjectsCapstone projects: Kanban board, real-time WebSocket chat, SSR Nuxt blog, generic TypeScript component library.