(returnFiber, current, element, expirationTime)
| 9056 | } |
| 9057 | |
| 9058 | function updateElement(returnFiber, current, element, expirationTime) { |
| 9059 | if (current !== null && current.type === element.type) { |
| 9060 | // Move based on index |
| 9061 | var existing = useFiber(current, element.props, expirationTime); |
| 9062 | existing.ref = coerceRef(returnFiber, current, element); |
| 9063 | existing['return'] = returnFiber; |
| 9064 | { |
| 9065 | existing._debugSource = element._source; |
| 9066 | existing._debugOwner = element._owner; |
| 9067 | } |
| 9068 | return existing; |
| 9069 | } else { |
| 9070 | // Insert |
| 9071 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 9072 | created.ref = coerceRef(returnFiber, current, element); |
| 9073 | created['return'] = returnFiber; |
| 9074 | return created; |
| 9075 | } |
| 9076 | } |
| 9077 | |
| 9078 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 9079 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected