The Pipeline
February 9, 20261 min readpart 01/13
When you write <App />, a chain of transformations runs before pixels reach the screen. Understanding this full pipeline is the key to understanding React.
JSX → React.createElement() → React Element (plain object)
→ Reconciler (Fiber) → Commit → DOM → Browser PaintJSX is not HTML. Babel (or SWC/esbuild) transforms it into React.createElement() calls — or the newer jsx() runtime from React 17. The result is a plain JavaScript object:
// What you write:
<div className="app">
<Header title="Hello" />
</div>
// What it becomes:
{
$$typeof: Symbol(react.element), // Security: prevents JSON injection
type: 'div',
props: {
className: 'app',
children: {
$$typeof: Symbol(react.element),
type: Header, // Reference to the function
props: { title: 'Hello' },
}
},
}The
$$typeof: Symbol(react.element)field is a security measure. Since Symbols can't be serialized to JSON, a server can't be tricked into returning a malicious element from user input.
Further reading
- Why Do React Elements Have a $$typeof Property? (article) Dan Abramov on the XSS protection mechanism
- Introducing the New JSX Transform (blog) React team on the jsx() runtime and why createElement was replaced
- How Does JSX Work Internally? (deep dive) jser.dev traces JSX from Babel to element objects to Fibers
- Building a Custom React Renderer (video) Sophie Alpert shows how elements flow into the reconciler