Vue
A progressive, approachable framework that scales from a single script tag to a full application with the Composition API.
23 មេរៀន
Vue
ចាប់ផ្តើមវគ្គសិក្សាGetting Started
- What is Vue?Vue's philosophy as a "progressive framework" and where it fits alongside plain JavaScript and React.
- Setting Up a Vue ProjectScaffolding a real Vue application with Vite, and what each generated file is for.
- Vue Application StructureHow a Single-File Component is put together, and what belongs in template, script, and style.
Template Syntax & Reactivity
- Template Syntax and InterpolationMustache interpolation, v-bind for attributes, and how Vue templates differ from plain HTML.
- The Composition API and script setupWhy Vue 3 introduced the Composition API, how script setup works, and how it compares to the older Options API.
- Reactivity with ref and reactiveThe two core primitives for reactive state, when to reach for each, and the .value gotcha that trips up beginners.
- Computed PropertiesDeriving values from reactive state with computed(), and why it beats recalculating in a method or template expression.
Reacting to Change & Handling Input
- Watchers - watch and watchEffectRunning side effects in response to reactive state changes, and the difference between watch and watchEffect.
- Event Handling with v-onListening for DOM events with v-on/@, passing arguments, and the event modifiers that replace common boilerplate.
- Form Input Bindings with v-modelTwo-way binding for form inputs, how v-model works across different input types, and what it expands to under the hood.
Rendering Lists & Conditionals
Components Deep Dive
- Component Basics and Single-File ComponentsBreaking a UI into reusable components, and how they're imported and composed in practice.
- PropsPassing data into a component with defineProps, validating it, and why props flow only one direction.
- Emitting Custom EventsSending data back up to a parent with defineEmits, completing the one-way data flow that props start.
- SlotsPassing template content — not just data — into a component, and how named and scoped slots extend the pattern.
- Provide and InjectSharing data across deeply nested components without threading props through every level in between.
- Lifecycle HooksRunning code at specific points in a component's life — mounting, updating, and unmounting — with onMounted and friends.
Routing with Vue Router
State Management with Pinia