Skip to content

ComponentEx.addChild method

ComponentEx › addChild

Adds a child component.

Mirrors the native Component.addChild contract: if this component is already loaded, the child is loaded immediately, so child._loaded is set before this method returns even when this component has async load logic. The child's async tail (if any) is sequenced into the load promise so a later loadWithPromises call awaits it.

Signature:

addChild(component: TComponent): TComponent

Parameters:

ParameterTypeDescription
componentTComponentThe component instance to add.

Returns: TComponentThe added component.