Put in order · Vue.js course · Module 3: Reactivity
shallowRef syntax
Arrange the steps for using shallowRef in the correct order.
Items to put in order
- Import shallowRef from vue
- Create a variable: const data = shallowRef({ nested: 'value' })
- Vue re-renders after .value replacement
- To update: data.value = { ...data.value, nested: 'new' }
You can check the correct answer by solving this task in the CodeWorlds game.