← All notes

Vue ref() wraps a value in a reactive object with .value

Answer: In the Composition API, the recommended way to declare reactive state is ref(). It takes an argument and returns a ref object whose .value property holds that inner value.

Using a ref

The ref object has a single property .value that points to the inner value. Vue also documents an Options API path: the data option returns an object that Vue wraps in its reactivity system, and top-level properties are proxied on the component instance.

The implementation

The core ref function takes an inner value and returns a reactive, mutable ref object with a single .value property that points at that inner value. isRef checks whether a value is a ref object.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vue.js docs, Reactivity Fundamentals, CC BY 4.0, text only (vuejs/docs); Vue.js core, reactivity ref, MIT (vuejs/core). Notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE).

Cite this

Permanent ID: iil:note:3s9fpb2k

iinventedlight. 2026. "Vue ref() wraps a value in a reactive object with .value." iinventedlight Library, iil:note:3s9fpb2k, version of 2026-11-10. https://iinventedlight.com/library/notes/vue-reactivity-fundamentals/. License: CC-BY-4.0.

@misc{iil_note_3s9fpb2k,
  author = {{iinventedlight}},
  title = {{Vue ref() wraps a value in a reactive object with .value}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-10},
  url = {https://iinventedlight.com/library/notes/vue-reactivity-fundamentals/},
  note = {Permanent ID iil:note:3s9fpb2k. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vue-reactivity-fundamentals.md.