We review this in the next modules:
In VueJS 3, it is slighly different than VueJS 2 :
- To register globally, we write:
const MyAwesomeComponent = {
template: "#plan-picker-template",
data() {
return {
someData: "",
};
},
};
const app = Vue.createApp({})
.component("my-component", MyAwesomeComponent)
.mount("#app");
- To register locally, it is the same way as VueJS 2, i.e.:
const app = Vue.createApp({
components: {
"my-component": MyAwesomeComponent,
},
}).mount("#app");