MCPcopy Create free account
hub / github.com/Lobos/react-ui / mountComponentIntoNode

Function mountComponentIntoNode

docs/lib/react.js:11193–11210  ·  view source on GitHub ↗

* Mounts this component and inserts it into the DOM. * * @param {ReactComponent} componentInstance The instance to mount. * @param {DOMElement} container DOM element to mount into. * @param {ReactReconcileTransaction} transaction * @param {boolean} shouldReuseMarkup If true, do not insert marku

(wrapperInstance, container, transaction, shouldReuseMarkup, context)

Source from the content-addressed store, hash-verified

11191 * @param {boolean} shouldReuseMarkup If true, do not insert markup
11192 */
11193function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
11194 var markerName;
11195 if (ReactFeatureFlags.logTopLevelRenders) {
11196 var wrappedElement = wrapperInstance._currentElement.props;
11197 var type = wrappedElement.type;
11198 markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
11199 console.time(markerName);
11200 }
11201
11202 var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context);
11203
11204 if (markerName) {
11205 console.timeEnd(markerName);
11206 }
11207
11208 wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
11209 ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
11210}
11211
11212/**
11213 * Batched mount.

Callers

nothing calls this directly

Calls 1

ReactDOMContainerInfoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…