An open API service indexing awesome lists of open source software.

https://github.com/react-widget/portal

https://react-widget.github.io/portal/
https://github.com/react-widget/portal

portal react-portal react-widget

Last synced: about 2 months ago
JSON representation

https://react-widget.github.io/portal/

Awesome Lists containing this project

README

        

# react-widget-portal

## Install

```
npm install --save react-widget-portal
```

## Usage

[![Edit react-widget-portal](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-widget-portal-p7o6oooqv7?fontsize=14&hidenavigation=1&theme=dark)

```
import Portal from 'react-widget-portal';

Hello Portal

```

## Interface

```ts
interface PortalProps {
/** 渲染容器,默认为:document.body */
container?: HTMLElement | Promise | null;
/** 初始渲染时触发,注:如果container为null时不会触发,直到container存在 */
onChildrenMount?: () => void;
}
```