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

Function recollectNodeTree

test/fixtures/preact.js:308–316  ·  view source on GitHub ↗
(node, unmountOnly)

Source from the content-addressed store, hash-verified

306 recollectNodeTree(child, !1);
307 }
308 function recollectNodeTree(node, unmountOnly) {
309 var component = node._component;
310 if (component) unmountComponent(component);
311 else {
312 if (null != node.__preactattr_) applyRef(node.__preactattr_.ref, null);
313 if (!1 === unmountOnly || null == node.__preactattr_) removeNode(node);
314 removeChildren(node);
315 }
316 }
317 function removeChildren(node) {
318 node = node.lastChild;
319 while (node) {

Callers 5

idiffFunction · 0.85
innerDiffNodeFunction · 0.85
removeChildrenFunction · 0.85
renderComponentFunction · 0.85
buildComponentFromVNodeFunction · 0.85

Calls 4

unmountComponentFunction · 0.85
removeChildrenFunction · 0.85
applyRefFunction · 0.70
removeNodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…