react / createElement

Function: createElement()

createElement(type, props, children)

function createElement(
   type: "input",
   props?: null | InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>, ...
children?: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>

Parameters

Parameter Type
type "input"
props? null | InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>
...children? ReactNode[]

Returns

DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:522

createElement(type, props, children)

function createElement<P, T>(
   type: keyof ReactHTML,
   props?: null | ClassAttributes<T> & P, ...
children?: ReactNode[]): DetailedReactHTMLElement<P, T>

Type Parameters

Type Parameter
P extends HTMLAttributes<T, P>
T extends HTMLElement

Parameters

Parameter Type
type keyof ReactHTML
props? null | ClassAttributes<T> & P
...children? ReactNode[]

Returns

DetailedReactHTMLElement<P, T>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:527

createElement(type, props, children)

function createElement<P, T>(
   type: keyof ReactSVG,
   props?: null | ClassAttributes<T> & P, ...
   children?: ReactNode[]): ReactSVGElement

Type Parameters

Type Parameter
P extends SVGAttributes<T, P>
T extends SVGElement

Parameters

Parameter Type
type keyof ReactSVG
props? null | ClassAttributes<T> & P
...children? ReactNode[]

Returns

ReactSVGElement

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:532

createElement(type, props, children)

function createElement<P, T>(
   type: string,
   props?: null | ClassAttributes<T> & P, ...
children?: ReactNode[]): DOMElement<P, T>

Type Parameters

Type Parameter
P extends DOMAttributes<T, P>
T extends Element

Parameters

Parameter Type
type string
props? null | ClassAttributes<T> & P
...children? ReactNode[]

Returns

DOMElement<P, T>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:537

createElement(type, props, children)

function createElement<P>(
   type: FunctionComponent<P>,
   props?: null | Attributes & P, ...
children?: ReactNode[]): FunctionComponentElement<P>

Type Parameters

Type Parameter
P extends object

Parameters

Parameter Type
type FunctionComponent<P>
props? null | Attributes & P
...children? ReactNode[]

Returns

FunctionComponentElement<P>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:545

createElement(type, props, children)

function createElement<P, T, C>(
   type: ClassType<P, T, C>,
   props?: null | ClassAttributes<T> & P, ...
children?: ReactNode[]): CElement<P, T>

Type Parameters

Type Parameter
P extends object
T extends Component<P, any, any, T>
C extends ComponentClass<P, any, C>

Parameters

Parameter Type
type ClassType<P, T, C>
props? null | ClassAttributes<T> & P
...children? ReactNode[]

Returns

CElement<P, T>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:550

createElement(type, props, children)

function createElement<P>(
   type: string | FunctionComponent<P> | ComponentClass<P, any>,
   props?: null | Attributes & P, ...
children?: ReactNode[]): ReactElement<P>

Type Parameters

Type Parameter
P extends object

Parameters

Parameter Type
type string | FunctionComponent<P> | ComponentClass<P, any>
props? null | Attributes & P
...children? ReactNode[]

Returns

ReactElement<P>

Defined in

.pnpm/@types+react@18.3.11/node_modules/@types/react/ts5.0/index.d.ts:555

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.