Complete the code to create a reactive variable in Vue.
const count = [1](0);
In Vue, ref creates a reactive variable that tracks changes.
Complete the code to watch changes on a reactive variable.
watch([1], (newVal, oldVal) => { console.log(newVal); });You watch the reactive variable itself, not its value property.
Fix the error in the Vue template binding.
<template>
<div>{{ [1] }}</div>
</template>In Vue templates, refs are unwrapped automatically, so use the variable name directly.
Fill both blanks to create a computed property that doubles a count.
const doubleCount = computed(() => [1] * [2]);
Computed properties use the inner value of refs, so use count.value multiplied by 2.
Fill all three blanks to create a reactive object and update its property.
const state = [1]({ count: 0 }); function increment() { state.[2] += [3]; }
Use reactive to create a reactive object, then update its count property by 1.
