menu_book Course Curriculum (Vue 3) expand_more
SFC & Templates
Reactivity
Components
Forms & DOM
Async & Routing Patterns
watch
Learn watch in Vue 3 with a dedicated explanation, a concept-specific example, a production caution, and a mastery check.
12 min read
•
Beginner
Advertisement
vue-3-012.vue
vue
<script setup>
import { ref,watch } from "vue"; const query=ref(""); watch(query,(next,prev)=>console.log({prev,next}))
</script>
<template><input v-model="query"></template>
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content