Complete the code to create a reactive variable in Vue.
const count = [1](0);
In Vue 3, ref is used to create a reactive variable that holds a simple value like a number.
Complete the code to import the ref function from Vue.
import { [1] } from 'vue';
You import ref from Vue to create reactive variables in the Composition API.
Fix the error in the code to correctly define a reactive object.
const state = [1]({ count: 0 });
Use reactive to create a reactive object with multiple properties.
Fill both blanks to create a computed property that doubles a count.
const doubleCount = [1](() => state.count [2] 2);
ref instead of computed.computed creates a reactive value based on other reactive data. Multiplying by 2 doubles the count.
Fill all three blanks to watch the count and log changes.
watch([1], (newVal, oldVal) => { console.log('Count changed from', [2], 'to', [3]); });
watch observes changes to reactive data. The callback receives new and old values to compare.
