Open-Source Wikis

/

Vue.js

/

vuejs/core overview

/

Glossary

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 by RefImpl in packages/reactivity/src/ref.ts.
  • reactive — a deeply reactive Proxy over a plain object/array/Map/Set/WeakMap/WeakSet. Implemented in packages/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 with reactive to produce DeepReadonly.
  • computed — a lazy reactive derivation. Re-evaluates only when read after a dependency change. Implemented in packages/reactivity/src/computed.ts.
  • effect — a low-level primitive that re-runs a function whenever its dependencies change. The building block under watch and the renderer's component update job. See packages/reactivity/src/effect.ts.
  • Dep — the dependency tracker that maps a target+key to a set of subscribed effects. Lives in packages/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. See packages/reactivity/src/effectScope.ts.
  • watch / watchEffect — public APIs built on ReactiveEffect. watch gets explicit sources; watchEffect infers them from a function body. See packages/reactivity/src/watch.ts and packages/runtime-core/src/apiWatch.ts.

Components

  • Component — anything renderable: an options object, a function, or a defineComponent result. The exhaustive type is Component in packages/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 the ctx, props, slots, emit, render effect, and lifecycle queues.
  • ComponentPublicInstance — the this exposed inside templates and Options API methods. A proxy over the internal instance that performs property resolution across props, data, setup state, etc. See packages/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/watch keys onto an instance; Composition API uses setup() and the imperative reactivity primitives.
  • <script setup> — the SFC syntactic sugar that turns the entire <script> into the component's setup() body and exposes top-level bindings to the template. Compiled by packages/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 in packages/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() and createBlock() 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, …). See packages/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, …). See packages/shared/src/shapeFlags.ts.
  • Renderer — the createRenderer(options) factory in packages/runtime-core/src/renderer.ts. Returns { render, hydrate, createApp } configured with platform-specific nodeOps and patchProp.
  • nodeOps / patchProp — the two halves of RendererOptions. nodeOps creates/inserts/removes platform nodes; patchProp updates 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 in packages/compiler-core/src/ast.ts (ROOT, ELEMENT, TEXT, INTERPOLATION, DIRECTIVE, …).
  • Tokenizer — the streaming state machine in packages/compiler-core/src/tokenizer.ts that 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) and DirectiveTransform (per-directive). Driver in packages/compiler-core/src/transform.ts.
  • cacheStatic / static hoisting — the optimization pass that lifts unchanging subtrees to module scope so they are created only once. See packages/compiler-core/src/transforms/cacheStatic.ts.
  • Codegen — the final pass that walks codegenNode and writes JavaScript source. Implemented in packages/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 in packages/compiler-core/src/runtimeHelpers.ts.

SFC

  • Descriptor — the parsed representation of a .vue file. Contains template, script, scriptSetup, styles[], customBlocks[]. Produced by packages/compiler-sfc/src/parse.ts.
  • <script setup> macrosdefineProps, defineEmits, defineModel, defineSlots, defineExpose, defineOptions, withDefaults. Compile-time only; their implementations live under packages/compiler-sfc/src/script/.
  • resolveType — the type-only TypeScript resolver in packages/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. See packages/compiler-sfc/src/template/transformAssetUrl.ts.
  • Scoped styles — the <style scoped> plugin that adds a hash attribute selector to every rule. Implemented in packages/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 in packages/server-renderer/src/renderToString.ts.
  • Streaming SSRrenderToWebStream, renderToNodeStream, pipeToNodeWritable, pipeToWebWritable. See packages/server-renderer/src/renderToStream.ts.

Build flags

  • __DEV__ — replaced with true in dev builds and false in 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 the ssrUtils export from runtime-core.
  • __COMPAT__ — true only in vue-compat. Enables the Vue 2 compatibility code paths under packages/runtime-core/src/compat.
  • __VUE_OPTIONS_API__, __VUE_PROD_DEVTOOLS__, __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ — user-facing flags configured by the bundler. See reference/configuration.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Glossary – Vue.js wiki | Factory