(finishedWork)
| 29697 | ); |
| 29698 | } |
| 29699 | function commitAttachRef(finishedWork) { |
| 29700 | var ref = finishedWork.ref; |
| 29701 | if (null !== ref) { |
| 29702 | var instance = finishedWork.stateNode; |
| 29703 | if ("function" === typeof ref) |
| 29704 | if (shouldProfile(finishedWork)) |
| 29705 | try { |
| 29706 | startEffectTimer(), (finishedWork.refCleanup = ref(instance)); |
| 29707 | } finally { |
| 29708 | recordEffectDuration(); |
| 29709 | } |
| 29710 | else finishedWork.refCleanup = ref(instance); |
| 29711 | else |
| 29712 | "string" === typeof ref |
| 29713 | ? console.error("String refs are no longer supported.") |
| 29714 | : ref.hasOwnProperty("current") || |
| 29715 | console.error( |
| 29716 | "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", |
| 29717 | getComponentNameFromFiber(finishedWork) |
| 29718 | ), |
| 29719 | (ref.current = instance); |
| 29720 | } |
| 29721 | } |
| 29722 | function safelyAttachRef(current, nearestMountedAncestor) { |
| 29723 | try { |
| 29724 | runWithFiberInDEV(current, commitAttachRef, current); |
nothing calls this directly
no test coverage detected
searching dependent graphs…