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.

In more detail

createElement still works and is handy when you cannot use JSX. Modern compilers call the jsx function from the JSX runtime instead, but both return the same kind of plain element object.

Example

React.createElement("h1", { className: "title" }, "Hello")

Related terms

Taught in

References