Vue · Junior · Question 62 of 75
How do you pass both an argument and the native event to a handler?
<button @click="remove(item.id, $event)">Delete</button>- ✓Correct answer: Use an inline handler and the special
$eventvariable - 2The event is always passed as the first argument
- 3It's impossible to access the event with arguments
Explanation
An inline arrow function also works: @click="(e) => remove(item.id, e)".