menu_book Course Curriculum (Vue 3) expand_more
SFC & Templates
Reactivity
Components
Forms & DOM
Async & Routing Patterns
toRefs
Learn toRefs in Vue 3 with a dedicated explanation, a concept-specific example, a production caution, and a mastery check.
12 min read
•
Beginner
vue-3-015.vue
vue
<script setup>
import { reactive,toRefs } from "vue"; const state=reactive({x:2,y:3}); const {x,y}=toRefs(state)
</script>
<template>{{x+y}}</template>
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content