example/dist/bundle.js
function commitUnmount(current$$1) {
  onCommitUnmount(current$$1);

  switch (current$$1.tag) {
    case ClassComponent:
    case ClassComponentLazy:
      {
        safelyDetachRef(current$$1);
        var instance = current$$1.stateNode;
        if (typeof instance.componentWillUnmount === 'function') {
          safelyCallComponentWillUnmount(current$$1, instance);
        }
        return;
      }
    case HostComponent:
      {
        safelyDetachRef(current$$1);
        return;
      }
    case HostPortal:
      {
        // TODO: this is recursive.
        // We are also not using this parent because
        // the portal will get pushed immediately.
        if (supportsMutation) {
          unmountHostComponents(current$$1);
        } else if (supportsPersistence) {
          emptyPortalContainer(current$$1);
        }
        return;
      }
  }
}
function commitUnmount(current$$1) {
  onCommitUnmount(current$$1);

  switch (current$$1.tag) {
    case ClassComponent:
    case ClassComponentLazy:
      {
        safelyDetachRef(current$$1);
        var instance = current$$1.stateNode;
        if (typeof instance.componentWillUnmount === 'function') {
          safelyCallComponentWillUnmount(current$$1, instance);
        }
        return;
      }
    case HostComponent:
      {
        safelyDetachRef(current$$1);
        return;
      }
    case HostPortal:
      {
        // TODO: this is recursive.
        // We are also not using this parent because
        // the portal will get pushed immediately.
        if (supportsMutation) {
          unmountHostComponents(current$$1);
        } else if (supportsPersistence) {
          emptyPortalContainer(current$$1);
        }
        return;
      }
  }
}
function commitUnmount ( current$$1 ) { onCommitUnmount ( current$$1 ) ; switch ( current$$1 . tag ) { case ClassComponent : case ClassComponentLazy : { safelyDetachRef ( current$$1 ) ; var instance = current$$1 . stateNode ; if ( typeof instance . componentWillUnmount === 'function' ) { safelyCallComponentWillUnmount ( current$$1 , instance ) ; } return ; } case HostComponent : { safelyDetachRef ( current$$1 ) ; return ; } case HostPortal : { // TODO: this is recursive. // We are also not using this parent because // the portal will get pushed immediately. if ( supportsMutation ) { unmountHostComponents ( current$$1 ) ; } else if ( supportsPersistence ) { emptyPortalContainer ( current$$1 ) ; } return ; } } }
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
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