(returnFiber, current, element, expirationTime)
| 8382 | } |
| 8383 | |
| 8384 | function updateElement(returnFiber, current, element, expirationTime) { |
| 8385 | if (current !== null && current.type === element.type) { |
| 8386 | // Move based on index |
| 8387 | var existing = useFiber(current, element.props, expirationTime); |
| 8388 | existing.ref = coerceRef(returnFiber, current, element); |
| 8389 | existing['return'] = returnFiber; |
| 8390 | { |
| 8391 | existing._debugSource = element._source; |
| 8392 | existing._debugOwner = element._owner; |
| 8393 | } |
| 8394 | return existing; |
| 8395 | } else { |
| 8396 | // Insert |
| 8397 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 8398 | created.ref = coerceRef(returnFiber, current, element); |
| 8399 | created['return'] = returnFiber; |
| 8400 | return created; |
| 8401 | } |
| 8402 | } |
| 8403 | |
| 8404 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 8405 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected