(returnFiber, current, element, expirationTime)
| 8254 | } |
| 8255 | |
| 8256 | function updateElement(returnFiber, current, element, expirationTime) { |
| 8257 | if (current !== null && current.type === element.type) { |
| 8258 | // Move based on index |
| 8259 | var existing = useFiber(current, element.props, expirationTime); |
| 8260 | existing.ref = coerceRef(returnFiber, current, element); |
| 8261 | existing['return'] = returnFiber; |
| 8262 | { |
| 8263 | existing._debugSource = element._source; |
| 8264 | existing._debugOwner = element._owner; |
| 8265 | } |
| 8266 | return existing; |
| 8267 | } else { |
| 8268 | // Insert |
| 8269 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 8270 | created.ref = coerceRef(returnFiber, current, element); |
| 8271 | created['return'] = returnFiber; |
| 8272 | return created; |
| 8273 | } |
| 8274 | } |
| 8275 | |
| 8276 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 8277 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected