Question · Vue.js course · Module 9: Composables & VueUse

shallowRef vs ref

When do we use shallowRef() instead of ref()?

Answer options

  • Always instead of ref()
  • For large arrays/objects when we replace the whole value, not inner fields
  • Only for primitive values
  • Never, it is deprecated

You can check the correct answer by solving this task in the CodeWorlds game.