Vue Component Structure
Each component must consist of the following two tags:
<script>
</script>
<template>
</template>
In the template
tag you should write the layout, that is, presentation of our component:
<template>
<div>
Hello World
</div>
</template>
And in the script
tag, you should write the JavaScript code of our component. This code should be an object that will be exported from our component file:
<script>
export default {
}
</script>
The exported object specifies various settings and functions of the component. One of the settings is the name of this component:
export default {
name: 'App',
}
In the template
tag of your component, output some text with tags.