Components are one of the most powerful features of Vue. Let's take a look at how to write our first components and make use of them in a parent component.
Create a component:
// item-description.vue <template> <h1> This is item description </h1> </template>
<script>
export default {
name: 'item-description'
}
</script>
Page:
<template> <section class="container"> <item-description></item-description> </section> </template>
<script> import ItemDescription from '../components/item-description'; export default { components: { ItemDescription } } </script>