<Portal>

Uses React Portals API to render its children in document.body.

Usage

import {Portal} from 'libreact/lib/Portal';

<Portal>
  This will appear in a new node in document.body.
</Portal>

Props

  • el — optional, DOM element, where to render children. If not provided, a new <div> element is created and appended to document.body.

results matching ""

    No results matching ""