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
Leveraging Vue 3 Hooks for Modular and Maintainable Component Logic
Vue 3 introduces a funtcional approach to reusing component logic through hooks, addressing limitations found in Vue 2's mixins and higher-order components. Hooks enable grouping related state and behavior into reusable functions, improving clarity and maintainability.
Core Concepts of Vue 3 Hooks
Hooks in Vue 3 are plain JavaScript functions b ...
Posted on Tue, 07 Jul 2026 17:58:52 +0000 by SystemLord
Getting Started with Vue 3: A Comprehensive Guide
Vue 3 GuideIntroduction to Vue 3
On September 18, 2020, Vue.js released version 3.0 (https://cn.vuejs.org/guide/introduction.html)
Key Changes in Vue 3
Performance Improvements
Bundle size reduced by 41%
Initial rendering 55% faster, updates 133% faster
Memory usage reduced by 54%
Source Code Upgrades
Uses Proxy instead of defineProperty ...
Posted on Mon, 06 Jul 2026 16:34:39 +0000 by MichaelHe
Comprehensive Guide to Parent-Child Component Communication in Vue 3
Data Flow from Parent to Child Using Props
Passing Static Values
When passing fixed string literals to a child component, the v-bind directive (shorthand :) is not required.
<DashboardWidget
app-name="Analytics Hub"
current-release="2.4"
/>
Inside the child component, declare the expected properties using definePr ...
Posted on Mon, 08 Jun 2026 16:03:40 +0000 by PHPNewbie55
Key Differences Between Vue 2 and Vue 3
Lifecycle Hooks
Vue 2
Description
Vue 3
beforeCreate()
Before creation
setup()
created()
After creation
setup()
beforeMount()
Before mounting
onBeforeMount()
mounted()
After mounting
onMounted()
beforeUpdate()
Before update
onBeforeUpdate()
updated()
After update
onUpdated()
beforeDestroy()
Before destruction
onBeforeUnmount( ...
Posted on Sat, 16 May 2026 13:57:10 +0000 by awpti
Resolving Vue 3 Lifecycle Injection Warnings in Async Contexts
When working with Vue 3's Composition API, you might encounter the following console warning:
[Vue warn]: onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the ...
Posted on Thu, 14 May 2026 00:42:15 +0000 by Stinger51
Addressing Component Limitations in Vue 3 with the Composition API
In Vue 2, components often encounter significant architectural constraints as they grow in complexity. These limitations primarily manifest in two areas: managing code readability and facilitating logic reuse across components.
Challenges in Vue 2's Options API
The Options API organizes code by configuration blocks such as data, methods, comput ...
Posted on Sat, 09 May 2026 04:26:15 +0000 by Bennettman
Practical Usage Patterns of $attrs in Vue 3 Across Component Structures and APIs
In Vue 3, $attrs aggregates all attributes passed from a parent to a child component that are not explicitly declared via props. It replaces the separate $listeners found in Vue 2. Understanding its behavior across different component layouts and API styles is essential for flexible attribute forwarding.
Attribute Forwarding in Templates
Single ...
Posted on Fri, 08 May 2026 01:05:36 +0000 by drexnefex