MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / commitAttachRef

Function commitAttachRef

code/redux/public/app.js:11640–11664  ·  view source on GitHub ↗
(finishedWork)

Source from the content-addressed store, hash-verified

11638 }
11639
11640 function commitAttachRef(finishedWork) {
11641 var ref = finishedWork.ref;
11642 if (ref !== null) {
11643 var _instance5 = finishedWork.stateNode;
11644 var instanceToUse = void 0;
11645 switch (finishedWork.tag) {
11646 case HostComponent:
11647 instanceToUse = getPublicInstance(_instance5);
11648 break;
11649 default:
11650 instanceToUse = _instance5;
11651 }
11652 if (typeof ref === 'function') {
11653 ref(instanceToUse);
11654 } else {
11655 {
11656 if (!ref.hasOwnProperty('current')) {
11657 warning(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork), getStackAddendumByWorkInProgressFiber(finishedWork));
11658 }
11659 }
11660
11661 ref.current = instanceToUse;
11662 }
11663 }
11664 }
11665
11666 function commitDetachRef(current) {
11667 var currentRef = current.ref;

Callers 1

commitAllLifeCyclesFunction · 0.70

Calls 4

warningFunction · 0.85
refFunction · 0.70
getComponentNameFunction · 0.70

Tested by

no test coverage detected