Vue 3 Fundamentals
Enviroment Setup
Vue 3 requires Node.js for development. Install the Vue CLI globally:
npm install -g @vue/cli
vue --version # Verify version (≥4.5.0)
vue create project-name
# Select "Manually select features" during setup
Composition API Fundamentals
Reactive State Management
ref() for Primitive Values
<template>
<div&g ...
Posted on Sat, 01 Aug 2026 16:18:24 +0000 by tiki
Understanding ref and Template Refs in Vue 3 with Migration from Vue 2
Vue 3 introduces distinct concepts of ref for reactivity and template refs for accessing DOM elements or component instances.
ref: Reactive References
ref creates reactive data references in Composition API.
Basic Usage
import { ref } from 'vue'
const counter = ref(0)
console.log(counter.value) // Output: 0
counter.value++
console.log(counter ...
Posted on Thu, 30 Jul 2026 16:24:34 +0000 by tyson
Vue 3 vs Vue 2: Key Differences and Development Impacts
Core Improvements in Vue 3
Performance Enhancements: Virtual DOM rewritten with static node skipping and dynamic node-only processing. Update performence improved by 1.3-2x, and SSR speed increased 2-3x.
Tree-shaking Support: Removes unused modules during build. Based on static analysis of ES6 imports to identify and eliminate unused code.
Fra ...
Posted on Sun, 26 Jul 2026 16:30:24 +0000 by PHPdev
Deep Watch and Immediate Callback Execution in Vue.js
Basic Watch Usage
For a list page that requires automatic search when users input keywords, you can use watch to monitor search value changes instead of relying solely on input change events.
<template>
<div>
<div class="search-container">
<label>Search</label>
<input v-model="qu ...
Posted on Tue, 07 Jul 2026 17:05:37 +0000 by poelinca
Vue.js Core Concepts and Practical Implementation
To install Vue CLI globally:
npm install -g @vue/cli
npm install -g @vue/cli-init
Creating a new project:
vue create project-name
cd project-name
npm run serve
Template Fundamentals
Basic template syntax includes:
Text interpolation: {{ variable }}
v-once: One-time rendering
v-html: HTML rendering
v-bind: Attribute binding (shorthand ':')
Co ...
Posted on Sun, 05 Jul 2026 16:45:04 +0000 by KFC
Why Vue Doesn't Make Array Index Assignment Reactive via Object.defineProperty
Object.defineProperty can indeed observe array elements. For example, you can iterate over an array and define getter/setter for each index:
let array = [1, 2, 3, 4, 5];
array.forEach((item, index) => {
defineReactive(array, index, item);
});
function defineReactive(obj, key, val) {
Object.defineProperty(obj, key, {
enumerab ...
Posted on Sat, 20 Jun 2026 17:46:28 +0000 by klainis
Reactive Side-Effects with Vue 3 Watchers
Vue 3’s watch API lets you run arbitrary code whenever a reactive value changes. Its the reactive system’s hook for side-effects—loggging, validation, network requests, or synchronizing related state.
Listening to a single ref
<template>
<p>Counter: {{ count }}</p>
<button @click="count++">Increment</but ...
Posted on Wed, 03 Jun 2026 17:54:37 +0000 by pingu
Vue 3 Reactive References and Style Customization Techniques
Reactive References in Vue 3
When working with reactive data in Vue 3's Composition API, the ref() function creates a reactive object containing a .value property. This wrapper object can hold any data type and is initially set to undefined. These reactive references can be directly used in templates through interpolation.
A common pattern invo ...
Posted on Mon, 18 May 2026 04:36:53 +0000 by zemerick
Vue 3 Core Concepts: Proxies, Reactivity Utilities, Composition API, and SSR Explained
const reactiveData = {
name: 'alice',
age: 30
};
const handler = {
get(target, key) {
console.log(`Accessing property: ${key}`);
return Reflect.get(target, key);
},
set(target, key, value) {
console.log(`Setting ${key} to ${value}`);
return Reflect.set(target, key, value);
},
deleteProperty(target, key) {
cons ...
Posted on Sun, 17 May 2026 10:14:17 +0000 by saad|_d3vil
Data Reactivity Mechanisms: Vue 2 vs Vue 3
Data Proxy and Data Hijacking
Understanding Vue's reactivity system requires examining two key concepts: data proxy and data hijacking.
Data proxy involves creating processed copies of properties defined in the data option. When accessing vm._data, you interact with getter and setter methods for each property. When a property changes, the sette ...
Posted on Fri, 15 May 2026 01:53:19 +0000 by OhLordy