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

Function prepareUpdate

dash/deps/react-dom@18.3.1.js:10976–10988  ·  view source on GitHub ↗
(domElement, type, oldProps, newProps, rootContainerInstance, hostContext)

Source from the content-addressed store, hash-verified

10974 }
10975 }
10976 function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
10977 {
10978 var hostContextDev = hostContext;
10979
10980 if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
10981 var string = '' + newProps.children;
10982 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
10983 validateDOMNesting(null, string, ownAncestorInfo);
10984 }
10985 }
10986
10987 return diffProperties(domElement, type, oldProps, newProps);
10988 }
10989 function shouldSetTextContent(type, props) {
10990 return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
10991 }

Callers 1

Calls 3

updatedAncestorInfoFunction · 0.70
validateDOMNestingFunction · 0.70
diffPropertiesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…