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>

Explanation

An inline arrow function also works: @click="(e) => remove(item.id, e)".

Further reading

Problem with a question

Vue · Junior · question 62

Test yourself

Take the Vue · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz