( children: ReactNodeList, containerInfo: any, // TODO: figure out the API for cross-renderer implementation. implementation: any, key: ?string = null, )
| 13 | import type {ReactNodeList, ReactPortal} from 'shared/ReactTypes'; |
| 14 | |
| 15 | export function createPortal( |
| 16 | children: ReactNodeList, |
| 17 | containerInfo: any, |
| 18 | // TODO: figure out the API for cross-renderer implementation. |
| 19 | implementation: any, |
| 20 | key: ?string = null, |
| 21 | ): ReactPortal { |
| 22 | if (__DEV__) { |
| 23 | checkKeyStringCoercion(key); |
| 24 | } |
| 25 | return { |
| 26 | // This tag allow us to uniquely identify this as a React Portal |
| 27 | $$typeof: REACT_PORTAL_TYPE, |
| 28 | key: key == null ? null : '' + key, |
| 29 | children, |
| 30 | containerInfo, |
| 31 | implementation, |
| 32 | }; |
| 33 | } |
nothing calls this directly
no test coverage detected