I didn't manage to find much on this, what's the difference between using a method and declaring a function in the script tag?
example.vue
<script>
export default{
methods: {
testfunction1(){
...
}
},
mounted(){
this.testfunction1();
}
}
</script>
compared to
<script>
export default{
methods: {
...
},
mounted(){
testFunction1();
}
}
function testFunction1(){
...
}
</script>
PS: If they're both legit, what are their uses cases? - When to use both?