code: function recollectNodeTree(node, unmountOnly) {
      var component = node._component;
      if (component) {
        // if node is owned by a Component, unmount that component (ends up recursing back here)
        unmountComponent(component);
      } else {
        // If the node's VNode had a ref function, invoke it with null here.
        // (this is part of the React spec, and smart for unsetting references)
        if (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);
  
        if (unmountOnly === false || node['__preactattr_'] == null) {
          removeNode(node);
        }
  
        removeChildren(node);
      }
    }
docs: Recursively recycle (or just unmount) a node and its descendants.
  @param {Node} node						DOM node to start unmount/removal from
  @param {Boolean} [unmountOnly=false]	If `true`, only triggers unmount lifecycle, skips removal