jsx
JSX is a syntax extension for JavaScript used primarily with React to describe user interfaces. It resembles HTML, but it is not HTML and is compiled into JavaScript expressions. This enables developers to write UI code in a declarative, hierarchical style that mirrors the rendered structure.
During compilation, tools such as Babel transform JSX into JavaScript calls that create element representations. In
JSX supports embedding JavaScript expressions inside curly braces, allowing dynamic values, conditional rendering, and mapping over
There are important differences from HTML. Several attribute names differ, most notably className instead of class
Although JSX is closely associated with React, it is not exclusive to it and can be used