vuejs/core
Glossary
Vue's source code uses a fairly dense vocabulary. This page collects the project-specific terms that recur across the wiki and the codebase. Generic JavaScript or web concepts (proxy, prototype, ESM, Web Components, …) are not included.
Reactivity
ref— a reactive container for a single value, accessed via.value. Implemented byRefImplinpackages/reactivity/src/ref.ts.reactive— a deeply reactiveProxyover a plain object/array/Map/Set/WeakMap/WeakSet. Implemented inpackages/reactivity/src/reactive.ts.shallowRef/shallowReactive— variants that only track the top level; nested values stay as raw references.readonly— a proxy that throws/warns on write. Composed withreactiveto produceDeepReadonly.computed— a lazy reactive derivation. Re-evaluates only when read after a dependency change. Implemented inpackages/reactivity/src/computed.ts.effect— a low-level primitive that re-runs a function whenever its dependencies change. The building block underwatchand the renderer's component update job. Seepackages/reactivity/src/effect.ts.Dep— the dependency tracker that maps a target+key to a set of subscribed effects. Lives inpackages/reactivity/src/dep.ts.track/trigger— internal helpers called from proxy traps to register a read (track) or notify writes (trigger).EffectScope— a container that owns multiple effects and disposes them together. Backs Vue's per-component scope and Pinia's stores. Seepackages/reactivity/src/effectScope.ts.watch/watchEffect— public APIs built onReactiveEffect.watchgets explicit sources;watchEffectinfers them from a function body. Seepackages/reactivity/src/watch.tsandpackages/runtime-core/src/apiWatch.ts.
Components
- Component — anything renderable: an options object, a function, or a
defineComponentresult. The exhaustive type isComponentinpackages/runtime-core/src/component.ts. - Setup — the function invoked once per component instance. Returns either a render function or a state bag merged into the component's render context.
ComponentInternalInstance— Vue's internal handle for a mounted component; not the public proxy. Holds thectx,props,slots,emit, render effect, and lifecycle queues.ComponentPublicInstance— thethisexposed inside templates and Options API methods. A proxy over the internal instance that performs property resolution across props, data, setup state, etc. Seepackages/runtime-core/src/componentPublicInstance.ts.- Render function — a function that returns a vnode tree. May be hand-written, generated by the compiler, or produced from
<template>. - Options API / Composition API — the two authoring styles Vue supports. Options API maps the
data/methods/computed/watchkeys onto an instance; Composition API usessetup()and the imperative reactivity primitives. <script setup>— the SFC syntactic sugar that turns the entire<script>into the component'ssetup()body and exposes top-level bindings to the template. Compiled bypackages/compiler-sfc/src/compileScript.ts.
VNodes and rendering
- VNode — virtual DOM node. A plain JS object with
type,props,children,key,el,shapeFlag,patchFlag, etc. Defined inpackages/runtime-core/src/vnode.ts. - Fragment / Text / Comment / Static — special vnode types used by the compiler. Fragment groups multiple roots; Static represents a hoisted DOM string.
- Block — a vnode tree produced by
openBlock()andcreateBlock()that records its dynamic descendants in a flat array. Lets the renderer skip the static skeleton entirely. - Patch flag — a bitmask attached to a vnode by the compiler indicating which kinds of updates it can have (
TEXT,CLASS,STYLE,PROPS,FULL_PROPS,STABLE_FRAGMENT, …). Seepackages/shared/src/patchFlags.ts. - Shape flag — a bitmask indicating what kind of vnode this is (
ELEMENT,STATEFUL_COMPONENT,FUNCTIONAL_COMPONENT,TEXT_CHILDREN,ARRAY_CHILDREN,SLOTS_CHILDREN, …). Seepackages/shared/src/shapeFlags.ts. - Renderer — the
createRenderer(options)factory inpackages/runtime-core/src/renderer.ts. Returns{ render, hydrate, createApp }configured with platform-specificnodeOpsandpatchProp. nodeOps/patchProp— the two halves ofRendererOptions.nodeOpscreates/inserts/removes platform nodes;patchPropupdates props/attrs/events. Browser implementations:packages/runtime-dom/src/nodeOps.ts,packages/runtime-dom/src/patchProp.ts.
Compiler
- AST — the typed tree produced by
baseParse(). Node kinds are listed inpackages/compiler-core/src/ast.ts(ROOT,ELEMENT,TEXT,INTERPOLATION,DIRECTIVE, …). - Tokenizer — the streaming state machine in
packages/compiler-core/src/tokenizer.tsthat emits start/end tags, attributes, interpolation markers, and comments. - Transform — a function that walks the AST and either rewrites nodes or attaches a
codegenNode. Two flavors:NodeTransform(general) andDirectiveTransform(per-directive). Driver inpackages/compiler-core/src/transform.ts. cacheStatic/ static hoisting — the optimization pass that lifts unchanging subtrees to module scope so they are created only once. Seepackages/compiler-core/src/transforms/cacheStatic.ts.- Codegen — the final pass that walks
codegenNodeand writes JavaScript source. Implemented inpackages/compiler-core/src/codegen.ts. - Runtime helper — a symbolic identifier (
CREATE_ELEMENT_VNODE,OPEN_BLOCK,WITH_DIRECTIVES, …) that codegen emits and the runtime exports. Listed inpackages/compiler-core/src/runtimeHelpers.ts.
SFC
- Descriptor — the parsed representation of a
.vuefile. Containstemplate,script,scriptSetup,styles[],customBlocks[]. Produced bypackages/compiler-sfc/src/parse.ts. <script setup>macros —defineProps,defineEmits,defineModel,defineSlots,defineExpose,defineOptions,withDefaults. Compile-time only; their implementations live underpackages/compiler-sfc/src/script/.resolveType— the type-only TypeScript resolver inpackages/compiler-sfc/src/script/resolveType.ts(~60KB) that turns interface and type-alias annotations into runtime prop/emit definitions. The largest single SFC file.- Asset URL transform — rewrites
<img src="./foo.png">and similar in templates so bundlers can resolve them. Seepackages/compiler-sfc/src/template/transformAssetUrl.ts. - Scoped styles — the
<style scoped>plugin that adds a hash attribute selector to every rule. Implemented inpackages/compiler-sfc/src/style/pluginScoped.ts.
SSR and hydration
- Hydration — the process of binding existing server-rendered DOM to a client-side component tree. Implemented in
packages/runtime-core/src/hydration.ts. - Hydration strategy — a function that defers hydration until some condition is met (idle, visible, media query, interaction). See
packages/runtime-core/src/hydrationStrategies.ts. renderToString— the synchronous SSR entry. Walks the component tree and concatenates a string. Implemented inpackages/server-renderer/src/renderToString.ts.- Streaming SSR —
renderToWebStream,renderToNodeStream,pipeToNodeWritable,pipeToWebWritable. Seepackages/server-renderer/src/renderToStream.ts.
Build flags
__DEV__— replaced withtruein dev builds andfalsein prod. Wraps every warning, devtools hook, and developer-only check.__BROWSER__— true in browser builds, false in Node SSR builds. Strips off DOM-specific code from server bundles.__SSR__— true in builds that need to coexist with@vue/server-renderer. Gates thessrUtilsexport fromruntime-core.__COMPAT__— true only invue-compat. Enables the Vue 2 compatibility code paths underpackages/runtime-core/src/compat.__VUE_OPTIONS_API__,__VUE_PROD_DEVTOOLS__,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__— user-facing flags configured by the bundler. Seereference/configuration.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.