Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 420 Bytes

Portal.md

File metadata and controls

18 lines (12 loc) · 420 Bytes

<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.