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/
- Host: GitHub
- URL: https://github.com/react-widget/portal
- Owner: react-widget
- License: mit
- Created: 2018-06-29T13:40:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:37:48.000Z (over 2 years ago)
- Last Synced: 2025-02-15T08:04:12.339Z (2 months ago)
- Topics: portal, react-portal, react-widget
- Language: TypeScript
- Homepage:
- Size: 2.22 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-widget-portal
## Install
```
npm install --save react-widget-portal
```## Usage
[](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;
}
```