(returnFiber, current, element, expirationTime)
| 9272 | } |
| 9273 | |
| 9274 | function updateElement(returnFiber, current, element, expirationTime) { |
| 9275 | if (current !== null && current.type === element.type) { |
| 9276 | // Move based on index |
| 9277 | var existing = useFiber(current, element.props, expirationTime); |
| 9278 | existing.ref = coerceRef(returnFiber, current, element); |
| 9279 | existing['return'] = returnFiber; |
| 9280 | { |
| 9281 | existing._debugSource = element._source; |
| 9282 | existing._debugOwner = element._owner; |
| 9283 | } |
| 9284 | return existing; |
| 9285 | } else { |
| 9286 | // Insert |
| 9287 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 9288 | created.ref = coerceRef(returnFiber, current, element); |
| 9289 | created['return'] = returnFiber; |
| 9290 | return created; |
| 9291 | } |
| 9292 | } |
| 9293 | |
| 9294 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 9295 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected