is there a specific reason for Vue.js components being capitalized?
I see this a lot but I don't see a valid reason for why there are written this way. Even the cli repositories have this for components.
Component names should always be multi-word, except for root App components, and built-in components provided by Vue, such as <transition> or <component> . This prevents conflicts with existing and future HTML elements, since all HTML elements are a single word.
Components in Vue are composed of three parts; a template (which is like HTML), styles and JavaScript. These can be split into multiple files or the same . vue file.
Both of them show excellent performance and now are used for building popular web apps. In fact, Vue is better for building complex web apps than React.
It's just a convention to differentiate between the component constructor/definition (capitalised) and the component instances.
It's a common convention that classes are capitalised but instances of a class are not:
const user = new User()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With