JSX
The HTML-like syntax used in React code, such as <Button size="lg">Save</Button>, which compiles to JavaScript function calls.
In more detail
JSX lets components be written as markup mixed with JavaScript expressions in curly braces. Files containing JSX with TypeScript use the .tsx extension.
Example
<span className="badge">{count}</span>Related terms
- React — A JavaScript library for building user interfaces out of components, functions that return a description of what to show.
- TypeScript — JavaScript with added type annotations, checked by a compiler before the code runs.
- TSX file — A TypeScript file that may contain JSX markup, used for React components such as page.tsx.
- component — A reusable, self-contained piece of interface, such as a card or a modal, with its own markup, styles and behaviour.
- JSX runtime — The small module that compiled JSX calls, so each tag becomes a jsx function call imported automatically from react/jsx-runtime.
- transpilation — Translating source code into equivalent code in another form of the same language level, such as turning JSX into plain JavaScript.
- React element — A plain, read-only JavaScript object describing one piece of UI: its type, its props and an optional key.
Taught in
- Design Systems Architecture: Foundations, Layers & Taxonomy — Design Systems & Component Engineering
- Component API Ergonomics: Composition vs Boolean Config Props — Design Systems & Component Engineering
- Component Tree Composition: Interleaving RSC & Client — Next.js 15 & Modern App Router Architecture
- Async Data Fetching: Parallel Requests & Preloading — Next.js 15 & Modern App Router Architecture
- Metadata API: Dynamic OpenGraph & Head Management — Next.js 15 & Modern App Router Architecture
- JSX Transpilation: createElement, JSX Runtime, React Elements — React 19 & Modern Component Architecture
- Component Purity: Pure Functions, Idempotence And Side Effects — React 19 & Modern Component Architecture
- Props Contract: Immutability, Children, And Polymorphic Tags — React 19 & Modern Component Architecture
- useRef Mechanics: DOM References And Mutable Persistent State — React 19 & Modern Component Architecture
- Lifting State Up: Colocation, Ownership, And Data Flow — React 19 & Modern Component Architecture
- useContext in Depth: Scoping, Consumer Subscription Costs — React 19 & Modern Component Architecture
- The React Compiler: Automated Memoization Under The Hood — React 19 & Modern Component Architecture