Skip to main content

Vue

Vue.js 3: Getting Started with the Composition API

Introduction # Vue 3 introduced the Composition API, a new way to write component logic that feels natural and flexible. If you’re coming from Vue 2’s Options API, it might seem unfamiliar at first, but it’s actually quite intuitive once you understand the basics. In this post, we’ll explore what the Composition API is, why you might want to use it, and how to get started with practical examples.

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.