Category: Vue

0

Chapter 81: Vue v-once Directive

V-once This directive is not for everyday use like v-if, v-for, or v-model. It is a very targeted performance & optimization tool that says: “Render this element (and everything inside it) only once, when...

0

Chapter 82: Vue v-pre Directive

V-pre This directive is not something you use every day (unlike v-if, v-for, v-model, v-bind, @click…). It is a very targeted escape hatch that tells Vue: “Do not compile anything inside this element (or...

0

Chapter 83: Vue v-show Directive

V-show This directive is very similar to v-if, but it solves the same problem in a completely different way, and knowing when to choose v-show over v-if (and vice versa) is one of the...

0

Chapter 84: Vue v-slot Directive

V-slot directive (often written with its beautiful shorthand #) This is the modern, official way (since Vue 2.6 / Vue 3) to work with slots — replacing the older slot=”name” and slot-scope syntax. v-slot...

0

Chapter 85: Vue v-text Directive

V-text This directive is not one of the flashy ones like v-for, v-model or v-if — it doesn’t get much spotlight, but it solves a very specific, very real problem in a clean and...

0

Chapter 86: Vue Instance Options

Vue Instance Options (also called Options API, component options object, or simply the options object) This is the classic way of defining a Vue component — the way Vue started, the way millions of...

0

Chapter 87: Vue ‘data’ Option

The data option This is the original, classic way to define local reactive state in a Vue component — the way Vue worked from day one (Vue 1 → Vue 2 → early Vue...

0

Chapter 88: Vue ‘methods’ Option

The methods option This is the original, classic way to define functions (methods) inside a Vue component — the way Vue worked from the very beginning (Vue 1 → Vue 2 → early Vue...

0

Chapter 89: Vue ‘computed’ Option

The computed option This is the original, classic way to define derived / calculated values that automatically stay in sync with other reactive data. It is still extremely common in legacy codebases, in many...

0

Chapter 90: Vue ‘watch’ Option

The watch option This is the original, classic way to react to changes in reactive data (props, data, computed properties, etc.). Even in 2026 — when almost every new project uses <script setup> +...