JSX is just function calls
JSX is sugar. Your bundler rewrites it into React.createElement (or, in the React 19 JSX transform, jsx/jsxs from react/jsx-runtime). The runtime is the same call: tag name + props object + children.
const el = <button className="primary" onClick={save}>Save</button>;
// becomes (roughly):
const el = jsx('button', { className: 'primary', onClick: save, children: 'Save' });
That is the whole magic. JSX is HTML-shaped JavaScript. Curly braces drop back into JS, attributes are camelCase (className, htmlFor, tabIndex), and the value is an element — a plain object describing what to render. React's job is to take that object tree and reconcile it against the DOM.
