function invokeRefsForVTree(vTree, value) {
  const componentTree = ComponentTreeCache.get(vTree);

  if (vTree.childNodes.length) {
    vTree.childNodes.filter(Boolean).forEach(childNode => {
      invokeRefsForVTree(childNode, value);
    });
  }

  const instance = InstanceCache.get(componentTree || vTree);

  if (!instance) {
    invokeRef(Internals.NodeCache.get(vTree), vTree, value);
    return;
  }

  // If any instances exist, loop through them and invoke the respective `ref`
  // logic.
  invokeRef(instance, vTree, value);
}
@param {VTree} vTree - Element to start search, crawl for refs to invoke
@param {HTMLElement | VTree | null} value - Value to populate ref with