invokeRef = (target = EMPTY.OBJ, vTree, value) => {
  let { ref } = target.props || target;

  // Allow refs to be passed to HTML elements. When in a DOM environment
  // a Node will be passed to the ref function and assigned.
  if (!ref) {
    target = Internals.NodeCache.get(vTree);
    ref = vTree.attributes.ref;
  }

  // Only backfill the value with target if no value was provided (either null
  // or a truthy value).
  if (value === undefined) {
    value = target;
  }

  if (typeof ref === 'function') {
    ref(value);
  }
  else if (typeof ref === 'object' && ref) {
    ref.current = value;
  }
  else if (typeof ref === 'string') {
    target.refs = { ...target.refs, [ref]: value };
  }
}
@param {any} target
@param {VTree} vTree
@param {HTMLElement | VTree | null=} value