MCPcopy Create free account
hub / github.com/microsoft/SandDance / render

Function render

docs/external/js/react-dom.development.js:24960–24976  ·  view source on GitHub ↗
(element, container, callback)

Source from the content-addressed store, hash-verified

24958 return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
24959 }
24960 function render(element, container, callback) {
24961 if (!isValidContainer(container)) {
24962 {
24963 throw Error( "Target container is not a DOM element." );
24964 }
24965 }
24966
24967 {
24968 var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
24969
24970 if (isModernRoot) {
24971 error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
24972 }
24973 }
24974
24975 return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
24976 }
24977 function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
24978 if (!isValidContainer(containerNode)) {
24979 {

Callers 2

constructorMethod · 0.90
updateContextConsumerFunction · 0.70

Calls 4

isValidContainerFunction · 0.85
isContainerMarkedAsRootFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected