menu_book Course Curriculum (Vue 3) expand_more
SFC & Templates
Reactivity
Components
Forms & DOM
Async & Routing Patterns
Effect scope
Learn Effect scope in Vue 3 with a dedicated explanation, a concept-specific example, a production caution, and a mastery check.
12 min read
•
Advanced
vue-3-043.vue
vue
<script setup>
import { effectScope,ref,watch } from "vue"; const scope=effectScope(); scope.run(()=>{const n=ref(0);watch(n,v=>console.log(v))}); scope.stop()
</script>
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content