What is an HTML-like JSX element? - Why component instance should be named uppercase??

PHOTO EMBED

Fri Jun 17 2022 10:59:42 GMT+0000 (UTC)

Saved by @mehran1801 #react.js

Answer
An HTML-like JSX element is an element with a lower case tag name. In JSX, lower case tag names will be treated as HTML tags, while upper case tag names will be treated as a component instance.

For instance, lower case <button> is treated as an HTML element, while upper case <Button> would be treated as a component instance of the Button class.

As a consequence of this, React components must always start with a capital letter, or will otherwise be treated as an HTML element.
content_copyCOPY

https://discuss.codecademy.com/t/what-is-an-html-like-jsx-element/392722?_gl