What’s the difference between @click and v-on:click in Vue.js?

In this article, we’ll look at what’s the difference between @click and v-on:click in Vue.js.

What’s the difference between @click and v-on:click in Vue.js?

There’re no difference between @click and v-on:click in Vue.js.

@ is a shorthand for v-on:.

So

<a v-on:click="doSomething"></a>

is the same as

<a @click="doSomething"></a>

They both call the doSomething method when we click on the anchor element.

Conclusion

There’re no difference between @click and v-on:click in Vue.js.