code: function commitUnmount(current) {
      if (typeof onCommitUnmount === 'function') {
        onCommitUnmount(current);
      }
  
      switch (current.tag) {
        case ClassComponent$9:
          {
            safelyDetachRef(current);
            var instance = current.stateNode;
            if (typeof instance.componentWillUnmount === 'function') {
              safelyCallComponentWillUnmount(current, instance);
            }
            return;
          }
        case HostComponent$9:
          {
            safelyDetachRef(current);
            return;
          }
        case CoroutineComponent$4:
          {
            commitNestedUnmounts(current.stateNode);
            return;
          }
        case HostPortal$7:
          {
            // TODO: this is recursive.
            // We are also not using this parent because
            // the portal will get pushed immediately.
            unmountHostComponents(current);
            return;
          }
      }
    }
docs: User-originating errors (lifecycles and refs) should not interrupt deletion, so don't let them throw. Host-originating errors should interrupt deletion, so it's okay