(returnFiber, current, element, expirationTime)
| 9159 | } |
| 9160 | |
| 9161 | function updateElement(returnFiber, current, element, expirationTime) { |
| 9162 | if (current !== null && current.type === element.type) { |
| 9163 | // Move based on index |
| 9164 | var existing = useFiber(current, element.props, expirationTime); |
| 9165 | existing.ref = coerceRef(returnFiber, current, element); |
| 9166 | existing['return'] = returnFiber; |
| 9167 | { |
| 9168 | existing._debugSource = element._source; |
| 9169 | existing._debugOwner = element._owner; |
| 9170 | } |
| 9171 | return existing; |
| 9172 | } else { |
| 9173 | // Insert |
| 9174 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 9175 | created.ref = coerceRef(returnFiber, current, element); |
| 9176 | created['return'] = returnFiber; |
| 9177 | return created; |
| 9178 | } |
| 9179 | } |
| 9180 | |
| 9181 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 9182 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected