0 votes
in VueJS by
What is the reason for recommendation for multi-word component names?

1 Answer

0 votes
by

Component names should always be multi-word, except for root level or built-in vue components(such as <transition> or <component> etc). This recommendation is to prevent conflicts with existing and future HTML elements, since all HTML elements are a single word.

Vue.component('user', { //bad approach
  // ...
})
Vue.component('user-profile', { //good approach
       // ...
     })

Related questions

0 votes
asked Sep 14, 2023 in VueJS by AdilsonLima
0 votes
asked Sep 7, 2023 in VueJS by DavidAnderson
...