Why should component names start with capital letter?
- It ensures proper scoping of the component
- It improves the performance of the component
- It is a convention that makes the code easier to read
- It is a requirement of the React compiler
In React, component names should start with a capital letter in order to distinguish them from regular HTML tags and make the code easier to read. This is a convention that is widely used in the React community and helps developers understand the purpose and scope of different parts of the code.
Loading...