MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / commitDetachRef

Function commitDetachRef

code/event-handlers/public/app.js:10745–10754  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

10743 }
10744
10745 function commitDetachRef(current) {
10746 var currentRef = current.ref;
10747 if (currentRef !== null) {
10748 if (typeof currentRef === 'function') {
10749 currentRef(null);
10750 } else {
10751 currentRef.current = null;
10752 }
10753 }
10754 }
10755
10756 // User-originating errors (lifecycles and refs) should not interrupt
10757 // deletion, so don't let them throw. Host-originating errors should

Callers 1

commitAllHostEffectsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected