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.
- Chapter 1
Getting Started with Vue.js and the Composition API
14 lessons • 1 hr3:07
7:04
9:27
7:21
3:53
4:13
3:23
7:21
5:18
5:06
3:38
3:20
1:13