[Vuejs]-Vue component not showing vue js

0👍

If you define your component like this:

components: {
  Header
},

call it inside your template like this: <Header /> with capitalize.

If you want to use kebab-case like: <header></header>, define your component like this:

components: {
  'header': Header
},

Edit
According to @MaxLyashuk comment, the naming convention for Vue component (source) is case-insensitive in that case.

The fact that <Header /> capitalized worked is because <header> is a reserved word for html markup.

Leave a comment