Complete the code to create a shallow reactive object in Vue.
import { [1] } from 'vue'; const state = [1]({ count: 0, nested: { value: 10 } });
Use shallowReactive to create a reactive object where only the root level is reactive, not nested properties.
Complete the code to create a shallow ref in Vue.
import { [1] } from 'vue'; const count = [1](0);
shallowRef creates a reactive reference where the inner value is not deeply reactive.
Fix the error in the code to correctly create a shallow reactive object.
import { [1] } from 'vue'; const data = [1]({ user: { name: 'Alice' } });
Replace reactive with shallowReactive to make only the root level reactive.
Fill both blanks to create a shallow ref and access its value correctly.
import { [1] } from 'vue'; const count = [1](0); console.log(count.[2]);
Use shallowRef to create the ref and access its inner value with .value.
Fill all three blanks to create a shallow reactive object and update a nested property.
import { [1] } from 'vue'; const state = [1]({ nested: { count: 0 } }); state.nested.[2] = 5; console.log(state.nested.[3]);
Use shallowReactive to create the object. Then update and access the nested count property.