Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Vue.js 3 Fundamentals with the Composition API

Methods in Vue with the Composition API

It is handy to run JavaScript expressions directly in the template or a directive sometimes - but not always.

When the expression gets too verbose, or we need the same logic in multiple places, we can extract the logic to a function and fire the function instead. These functions are called methods and allow us to DRY up the code.