FrontendDeveloper.in

Vue.js question detail

What is the reason for recommendation for multi-word component names?

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
// ...
})
Back to all Vue.js questions
Get LinkedIn Premium at Rs 399