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

Function canHydrateInstance

docs/external/js/react-dom.development.js:7759–7766  ·  view source on GitHub ↗
(instance, type, props)

Source from the content-addressed store, hash-verified

7757 textInstance.nodeValue = text;
7758 } // -------------------
7759 function canHydrateInstance(instance, type, props) {
7760 if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
7761 return null;
7762 } // This has now been refined to an element node.
7763
7764
7765 return instance;
7766 }
7767 function canHydrateTextInstance(instance, text) {
7768 if (text === '' || instance.nodeType !== TEXT_NODE) {
7769 // Empty strings are not parsed by HTML so there won't be a correct match here.

Callers 1

tryHydrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected