How to do it...

First, we will create two regular elements: the first will represent a man--you can use the man emoji:

Vue.component('man', {   template: '<p>man</p>' })

Well, that was simple. Next, we will create a cat component:

Vue.component('cat', {   template: '<p>cat</p>' })

After those, you can instantiate Vue like this:

new Vue({   el: '#app' })

In your HTML, you compose all the three with the following code:

<div id="app">   <man></man>   <cat></cat> </div>

Run the page and you will see the two emojis:

We will give superpowers to ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.