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