MCPcopy Create free account
hub / github.com/plotly/dash / createInstance

Function createInstance

dash/deps/react-dom@18.3.1.js:10934–10955  ·  view source on GitHub ↗
(type, props, rootContainerInstance, hostContext, internalInstanceHandle)

Source from the content-addressed store, hash-verified

10932 selectionInformation = null;
10933 }
10934 function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
10935 var parentNamespace;
10936
10937 {
10938 // TODO: take namespace into account when validating.
10939 var hostContextDev = hostContext;
10940 validateDOMNesting(type, null, hostContextDev.ancestorInfo);
10941
10942 if (typeof props.children === 'string' || typeof props.children === 'number') {
10943 var string = '' + props.children;
10944 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
10945 validateDOMNesting(null, string, ownAncestorInfo);
10946 }
10947
10948 parentNamespace = hostContextDev.namespace;
10949 }
10950
10951 var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
10952 precacheFiberNode(internalInstanceHandle, domElement);
10953 updateFiberProps(domElement, props);
10954 return domElement;
10955 }
10956 function appendInitialChild(parentInstance, child) {
10957 parentInstance.appendChild(child);
10958 }

Callers 1

completeWorkFunction · 0.70

Calls 5

validateDOMNestingFunction · 0.70
updatedAncestorInfoFunction · 0.70
createElementFunction · 0.70
precacheFiberNodeFunction · 0.70
updateFiberPropsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…