( children: ReactNodeList, container: Element | DocumentFragment, key: ?string = null, )
| 54 | } |
| 55 | |
| 56 | function createPortal( |
| 57 | children: ReactNodeList, |
| 58 | container: Element | DocumentFragment, |
| 59 | key: ?string = null, |
| 60 | ): React$Portal { |
| 61 | if (!isValidContainer(container)) { |
| 62 | throw new Error('Target container is not a DOM element.'); |
| 63 | } |
| 64 | |
| 65 | // TODO: pass ReactDOM portal implementation as third argument |
| 66 | // $FlowFixMe[incompatible-return] The Flow type is opaque but there's no way to actually create it. |
| 67 | return createPortalImpl(children, container, null, key); |
| 68 | } |
| 69 | |
| 70 | export { |
| 71 | ReactVersion as version, |
no test coverage detected