MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / commitUnmount

Function commitUnmount

bundle.js:7596–7599  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

7594// deletion, so don't let them throw. Host-originating errors should
7595// interrupt deletion, so it's okay
7596function 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.
7597// We are also not using this parent because
7598// the portal will get pushed immediately.
7599unmountHostComponents(current);return;}}}function commitWork(current,finishedWork){switch(finishedWork.tag){case ClassComponent$9:{return;}case HostComponent$9:{var instance=finishedWork.stateNode;if(instance!=null){// Commit the work prepared earlier.
7600var newProps=finishedWork.memoizedProps;// For hydration we reuse the update path but we treat the oldProps
7601// as the newProps. The updatePayload will contain the real change in
7602// this case.

Callers 2

commitNestedUnmountsFunction · 0.85
unmountHostComponentsFunction · 0.85

Calls 4

safelyDetachRefFunction · 0.85
commitNestedUnmountsFunction · 0.85
unmountHostComponentsFunction · 0.85

Tested by

no test coverage detected