Complete the code to create a reactive reference in Vue.
const count = [1](0);
In Vue, ref is used to create a reactive reference to a value.
Complete the code to create a computed property that doubles the count.
const doubleCount = [1](() => count.value * 2);
computed creates a reactive value that updates automatically when its dependencies change.
Fix the error in the code to watch changes on count and log the new value.
watch([1], (newVal) => { console.log(newVal); });The watch function expects a getter function to track dependencies properly.
Fill both blanks to create a reactive object and access its property.
const state = [1]({ count: 0 }); console.log(state.[2]);
reactive creates a reactive object, and you access its properties directly.
Fill all three blanks to create a computed property that returns the uppercase name from a reactive object.
const state = reactive({ name: 'vue' });
const upperName = [1](() => state.[2].[3]());computed creates a reactive value, accessing the name property and calling toUpperCase() to transform it.