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

Function commitDetachRef

code/new-context-api/public/app.js:10776–10785  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

10774 }
10775
10776 function commitDetachRef(current) {
10777 var currentRef = current.ref;
10778 if (currentRef !== null) {
10779 if (typeof currentRef === 'function') {
10780 currentRef(null);
10781 } else {
10782 currentRef.current = null;
10783 }
10784 }
10785 }
10786
10787 // User-originating errors (lifecycles and refs) should not interrupt
10788 // 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