MCPcopy
hub / github.com/preactjs/preact / isSameNodeType

Function isSameNodeType

test/fixtures/preact.js:59–65  ·  view source on GitHub ↗
(node, vnode, hydrating)

Source from the content-addressed store, hash-verified

57 while ((p = items.pop())) if (p.__d) renderComponent(p);
58 }
59 function isSameNodeType(node, vnode, hydrating) {
60 if ('string' == typeof vnode || 'number' == typeof vnode)
61 return void 0 !== node.splitText;
62 if ('string' == typeof vnode.nodeName)
63 return !node._componentConstructor && isNamedNode(node, vnode.nodeName);
64 else return hydrating || node._componentConstructor === vnode.nodeName;
65 }
66 function isNamedNode(node, nodeName) {
67 return (
68 node.__n === nodeName ||

Callers 1

innerDiffNodeFunction · 0.85

Calls 1

isNamedNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…