Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Vue 3) expand_more
Vue 3 / Reactivity

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

Lesson quizzes