Do you know why react components start with capital letter????
The reason behind this is, react components written in JSX which internally convert it to react.createElement API. This create element function is convert into plain javascript object. A fundamebtal data structure which is known as React Fiber. This whole happen because of Babel.
Babel takes the component and convert it to a React Fiber object.
When babel encounters a name string with a capital letter it recognise it as a refernece not a string. On contrary every thing else is converted into string
Follow for more tips and topics 😁
Top comments (0)