JSX runtime
The small module that compiled JSX calls, so each tag becomes a jsx function call imported automatically from react/jsx-runtime.
In more detail
Before React 17, JSX compiled to React.createElement, so every file had to import React. The automatic runtime makes the compiler add the import itself and passes the key as a separate third argument instead of inside props. You rarely call jsx yourself; the course does so only to see what compiled JSX produces.
Example
jsx("h3", { children: title }, "h")Related terms
- JSX — The HTML-like syntax used in React code, such as <Button size="lg">Save</Button>, which compiles to JavaScript function calls.
- createElement — The React function that creates a React element from a type, a props object and children; JSX used to compile to calls of it.
- React element — A plain, read-only JavaScript object describing one piece of UI: its type, its props and an optional key.
- key (React) — A special string or number you give to elements in a list so React can tell which item is which between renders.
Taught in
- JSX Transpilation: createElement, JSX Runtime, React Elements — React 19 & Modern Component Architecture