MCPcopy Create free account
hub / github.com/reactjs/react-rails / commitDetachRef

Function commitDetachRef

lib/assets/react-source/development/react.js:23731–23741  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

23729 }
23730
23731 function commitDetachRef(current) {
23732 var currentRef = current.ref;
23733
23734 if (currentRef !== null) {
23735 if (typeof currentRef === 'function') {
23736 currentRef(null);
23737 } else {
23738 currentRef.current = null;
23739 }
23740 }
23741 } // User-originating errors (lifecycles and refs) should not interrupt
23742 // deletion, so don't let them throw. Host-originating errors should
23743 // interrupt deletion, so it's okay
23744

Callers 1

commitMutationEffectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected