(returnFiber, current, element, expirationTime)
| 8345 | } |
| 8346 | |
| 8347 | function updateElement(returnFiber, current, element, expirationTime) { |
| 8348 | if (current !== null && current.type === element.type) { |
| 8349 | // Move based on index |
| 8350 | var existing = useFiber(current, element.props, expirationTime); |
| 8351 | existing.ref = coerceRef(returnFiber, current, element); |
| 8352 | existing['return'] = returnFiber; |
| 8353 | { |
| 8354 | existing._debugSource = element._source; |
| 8355 | existing._debugOwner = element._owner; |
| 8356 | } |
| 8357 | return existing; |
| 8358 | } else { |
| 8359 | // Insert |
| 8360 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 8361 | created.ref = coerceRef(returnFiber, current, element); |
| 8362 | created['return'] = returnFiber; |
| 8363 | return created; |
| 8364 | } |
| 8365 | } |
| 8366 | |
| 8367 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 8368 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected