Reactivity for Vues
Vue reactivity is the system that tracks which data a component uses and re-renders when it changes. In Vue 3, ref wraps primitive values and reactive wraps objects using proxies. Computed properties derive cached values, watchers run side effects, and lifecycle hooks such as onMounted run code at set stages of a component.
Stage: Core Vue · Part of the Vue roadmap · Last reviewed 19 November 2026
What to learn in Reactivity
- Create state with ref and reactive and read it correctly
- Derive values with computed and explain caching
- React to changes with watch and watchEffect
- Run setup work in onMounted and clean up in onUnmounted
- Avoid losing reactivity when destructuring reactive objects
Reactivity interview questions
What is the difference between ref and reactive?
ref holds any value in a .value property and is useful for primitives, while reactive makes an object deeply reactive via a proxy. Destructuring a reactive object loses reactivity, so many developers prefer ref or use toRefs.
When should you use computed instead of watch?
Use computed to derive a value from other state, since it is cached and only recalculates when dependencies change. Use watch for side effects such as fetching data or writing to storage when something changes.
Where Reactivity fits in the Vue roadmap
Reactivity belongs to the Core Vue stage (beginner level), which takes about 19 hours. Templates and reactivity.