BACK
|Javascript

#30daysofVue - Day 12 - Vue Global Components

Today I learned about Vue global components. We can register our components that we need globally in our app. eg.

Vue.component('component-a', { /* ... */ })

Vue.component('component-b', { /* ... */ })

Vue.component('component-c', { /* ... */ })

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

And we can access them directly in our Vue instance templates. eg.

<div id="app">

<component-a></component-a>

<component-b></component-b>

<component-c></component-c>

</div>

You can find me on some social media


Also check out my Instagram feed