Reference

createPortal

Creates a portal that renders children into a DOM container outside the parent tree.

Signature

function createPortal(children: ReactCompatNode, container: Element, key?: unknown): ReactCompatPortal