Represents a JSX element.

Where ReactNode represents everything that can be rendered, ReactElement only represents JSX.

const element: ReactElement = <div />;
interface ReactElement<
    P = unknown,
    T extends
        string | JSXElementConstructor<any> =
        | string
        | JSXElementConstructor<any>,
> {
    key: null
    | string;
    props: P;
    type: T;
}

Type Parameters

Hierarchy (View Summary)

Properties

Properties

key: null | string
props: P
type: T