JSX, short for JavaScript XML, is a syntax extension that lets you write HTML-like markup inside JavaScript. It makes components easier to read and write, and lets you mix JavaScript expressions into markup. JSX also gives better error messages and enables static type checking.
A compiler such as Babel turns JSX into function calls. The classic transform produces React.createElement() calls.
// JSX
const element = <h1>Hello, World!</h1>;
// Transpiled to
const element = React.createElement('h1', null, 'Hello, World!');
The new JSX transform, supported since React 17, calls react/jsx-runtime instead, so you can use JSX without importing React. React 19 requires it.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓