MCPcopy Create free account
hub / github.com/caseywebdev/react-list / canHydrateTextInstance

Function canHydrateTextInstance

docs/index.js:16985–16999  ·  view source on GitHub ↗
(instance, text, inRootOrSingleton)

Source from the content-addressed store, hash-verified

16983 return null;
16984}
16985function canHydrateTextInstance(instance, text, inRootOrSingleton) {
16986 if ("" === text) return null;
16987 for (; 3 !== instance.nodeType; ) {
16988 if (
16989 (1 !== instance.nodeType ||
16990 "INPUT" !== instance.nodeName ||
16991 "hidden" !== instance.type) &&
16992 !inRootOrSingleton
16993 )
16994 return null;
16995 instance = getNextHydratable(instance.nextSibling);
16996 if (null === instance) return null;
16997 }
16998 return instance;
16999}
17000function getNextHydratable(node) {
17001 for (; null != node; node = node.nextSibling) {
17002 var nodeType = node.nodeType;

Callers 1

beginWorkFunction · 0.85

Calls 1

getNextHydratableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…