Permalink
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (12 sloc) 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.