code: function getNameFromRoot(root: Object): string {
    // shallow
    if (root.unrendered) {
      const { type } = root.unrendered;
      return type.name || type;
    }
  
    const inst = instance(root);
    if (inst) {
      return inst._tag;
    }
  
    // direct node
    if (typeof root.type === 'string') {
      return root.type;
    }
  
    return typeof root.name === 'function' ? root.name() : '(anonymous)';
  }
docs: Gets the name of the node or component for the SINGLE item