Question · Vue.js course · Module 8: Slots & Dynamic Components
Passing data from a slot
How does a child component pass data to a scoped slot?
Answer options
- Through emit('slot-data', data)
- Through attributes on the <slot :item="item"> tag
- Through provide/inject
- Through props on the <template> tag
You can check the correct answer by solving this task in the CodeWorlds game.