(returnFiber, current, element, lanes)
| 13276 | } |
| 13277 | |
| 13278 | function updateElement(returnFiber, current, element, lanes) { |
| 13279 | var elementType = element.type; |
| 13280 | |
| 13281 | if (elementType === REACT_FRAGMENT_TYPE) { |
| 13282 | return updateFragment(returnFiber, current, element.props.children, lanes, element.key); |
| 13283 | } |
| 13284 | |
| 13285 | if (current !== null) { |
| 13286 | if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path: |
| 13287 | isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type. |
| 13288 | // We need to do this after the Hot Reloading check above, |
| 13289 | // because hot reloading has different semantics than prod because |
| 13290 | // it doesn't resuspend. So we can't let the call below suspend. |
| 13291 | typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) { |
| 13292 | // Move based on index |
| 13293 | var existing = useFiber(current, element.props); |
| 13294 | existing.ref = coerceRef(returnFiber, current, element); |
| 13295 | existing.return = returnFiber; |
| 13296 | |
| 13297 | { |
| 13298 | existing._debugSource = element._source; |
| 13299 | existing._debugOwner = element._owner; |
| 13300 | } |
| 13301 | |
| 13302 | return existing; |
| 13303 | } |
| 13304 | } // Insert |
| 13305 | |
| 13306 | |
| 13307 | var created = createFiberFromElement(element, returnFiber.mode, lanes); |
| 13308 | created.ref = coerceRef(returnFiber, current, element); |
| 13309 | created.return = returnFiber; |
| 13310 | return created; |
| 13311 | } |
| 13312 | |
| 13313 | function updatePortal(returnFiber, current, portal, lanes) { |
| 13314 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected
searching dependent graphs…