Put in order · Vue.js course · Module 3: Reactivity

Destructuring process with toRefs

Arrange the steps for safe destructuring with toRefs() in the correct order.

Items to put in order

  • Destructure: const { a, b } = toRefs(state)
  • Call toRefs(state)
  • Use a.value and b.value in script
  • Create a reactive object with reactive()

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