Question · Vue.js course · Module 8: Slots & Dynamic Components

Scoped slot destructuring

How do you destructure scoped slot data?

Answer options

  • Destructuring is not possible in slots
  • <template #default="slotProps"> and then slotProps.item
  • <template #default="{ item, index }">
  • Both of the above methods (slotProps and destructuring) are correct

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