Just started exploring Vue last night, so the answer might be obvious.
I came across components with this layout:
<template>
<Slider v-model="value"/>
</template>
<script>
import Slider from '@vueform/slider'
export default {
components: { Slider },
}
</script>
<style src="@vueform/slider/themes/default.css" />
and also components structured like a JS object:
app.component('button-counter', {
data() {
return {
count: 0
}
},
template: `
<button @click="count++">
You clicked me {{ count }} times.
</button>`
})
Is there any practical difference between them? Is one preferred over the other? Does it relate more to Vue2 or Vue3?