Skip to main content

Reactivity

Understanding Vue 3 Reactivity: Refs vs Reactive

·4 mins
Introduction # Vue 3’s reactivity system is powerful, but it can be confusing when you’re first learning about ref() and reactive(). Both are essential for creating reactive state, but they’re used in different situations. Let’s clarify when and how to use each one. Reactivity Basics # At its core, Vue’s reactivity system uses JavaScript Proxies to detect changes to your data and update the DOM accordingly. When you modify a reactive value, Vue automatically re-renders any components that depend on it.