Vue · Junior · Question 65 of 75
How does the parent receive the value sent with emit('select', id)?
<ItemList @select="onSelect" />
function onSelect(id) { /* ... */ }- ✓Correct answer: As the handler's argument
- 2Through
this.$event - 3By reading a prop called
select
Explanation
Extra arguments of emit are passed to the listener. In an inline handler the first one is available as $event.