MCPcopy Create free account
hub / github.com/microsoft/SandDance / createPortal$1

Function createPortal$1

docs/external/js/react-dom.development.js:25076–25088  ·  view source on GitHub ↗
(children, container)

Source from the content-addressed store, hash-verified

25074 setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
25075
25076 function createPortal$1(children, container) {
25077 var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
25078
25079 if (!isValidContainer(container)) {
25080 {
25081 throw Error( "Target container is not a DOM element." );
25082 }
25083 } // TODO: pass ReactDOM portal implementation as third argument
25084 // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
25085
25086
25087 return createPortal(children, container, null, key);
25088 }
25089
25090 function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
25091

Callers 1

unstable_createPortalFunction · 0.85

Calls 2

isValidContainerFunction · 0.85
createPortalFunction · 0.85

Tested by

no test coverage detected