React element
A plain, read-only JavaScript object describing one piece of UI: its type, its props and an optional key.
In more detail
Creating an element does not touch the page; it is only a description. The type is either a tag name such as "div" or a component function. React compares new elements with the previous ones to decide what to change in the DOM.
Example
{ type: "h3", props: { children: "Active Users" }, key: "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.
- component — A reusable, self-contained piece of interface, such as a card or a modal, with its own markup, styles and behaviour.
- Virtual DOM — A lightweight copy of the page structure kept as plain JavaScript objects, which a library such as React compares between renders instead of reading the real page.
- 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
- Component Purity: Pure Functions, Idempotence And Side Effects — React 19 & Modern Component Architecture
- Virtual DOM vs Real DOM: The Reconciliation Cost Model — React 19 & Modern Component Architecture
- Keys In Depth: Identity Preservation And Identity Resetting — React 19 & Modern Component Architecture
- Diffing Algorithm: Element Type Shifts And Subtree Tear Down — React 19 & Modern Component Architecture
- Slot Patterns And Headless UI Architecture in React — React 19 & Modern Component Architecture