Vue · Junior · Question 51 of 75

What do the .stop and .once event modifiers do?

<button @click.stop="select">Select</button>
<button @click.once="subscribe">Subscribe</button>

Explanation

Modifiers keep handlers focused on logic instead of DOM details. Others include .prevent, .self, .capture and .passive.

Further reading

Problem with a question

Vue · Junior · question 51

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