Skip to content

API Reference / @gtkx/react / createPortal

Variable: createPortal

const createPortal: (children, container, key?) => ReactPortal

Defined in: react/dist/reconciler/portal.d.ts:10

Creates a React portal that renders children into a different container in the widget tree.

Parameters

children

ReactNode

The nodes to render inside the container.

container

Container

The GObject or root element to render into.

key?

string | null

An optional React key for the portal.

Returns

ReactPortal

Released under the MPL-2.0 License.