(returnFiber, current, element, expirationTime)
| 9021 | } |
| 9022 | |
| 9023 | function updateElement(returnFiber, current, element, expirationTime) { |
| 9024 | if (current !== null && current.type === element.type) { |
| 9025 | // Move based on index |
| 9026 | var existing = useFiber(current, element.props, expirationTime); |
| 9027 | existing.ref = coerceRef(returnFiber, current, element); |
| 9028 | existing['return'] = returnFiber; |
| 9029 | { |
| 9030 | existing._debugSource = element._source; |
| 9031 | existing._debugOwner = element._owner; |
| 9032 | } |
| 9033 | return existing; |
| 9034 | } else { |
| 9035 | // Insert |
| 9036 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 9037 | created.ref = coerceRef(returnFiber, current, element); |
| 9038 | created['return'] = returnFiber; |
| 9039 | return created; |
| 9040 | } |
| 9041 | } |
| 9042 | |
| 9043 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 9044 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected