@lynx-js/react / createElement

Function: createElement()

createElement(type, props, children)

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

Parameters

ParameterType
type"input"
props?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?: ClassAttributes<T> & P, ...
children?: ReactNode[]): DetailedReactHTMLElement<P, T>

Type Parameters

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

Parameters

ParameterType
typekeyof ReactHTML
props?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?: ClassAttributes<T> & P, ...
   children?: ReactNode[]): ReactSVGElement

Type Parameters

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

Parameters

ParameterType
typekeyof ReactSVG
props?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?: ClassAttributes<T> & P, ...
children?: ReactNode[]): DOMElement<P, T>

Type Parameters

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

Parameters

ParameterType
typestring
props?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?: Attributes & P, ...
children?: ReactNode[]): FunctionComponentElement<P>

Type Parameters

Type Parameter
P extends object

Parameters

ParameterType
typeFunctionComponent<P>
props?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?: 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

ParameterType
typeClassType<P, T, C>
props?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?: Attributes & P, ...
children?: ReactNode[]): ReactElement<P>

Type Parameters

Type Parameter
P extends object

Parameters

ParameterType
typestring | FunctionComponent<P> | ComponentClass<P, any>
props?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.