(returnFiber, current, element, expirationTime)
| 9114 | } |
| 9115 | |
| 9116 | function updateElement(returnFiber, current, element, expirationTime) { |
| 9117 | if (current !== null && current.type === element.type) { |
| 9118 | // Move based on index |
| 9119 | var existing = useFiber(current, element.props, expirationTime); |
| 9120 | existing.ref = coerceRef(returnFiber, current, element); |
| 9121 | existing['return'] = returnFiber; |
| 9122 | { |
| 9123 | existing._debugSource = element._source; |
| 9124 | existing._debugOwner = element._owner; |
| 9125 | } |
| 9126 | return existing; |
| 9127 | } else { |
| 9128 | // Insert |
| 9129 | var created = createFiberFromElement(element, returnFiber.mode, expirationTime); |
| 9130 | created.ref = coerceRef(returnFiber, current, element); |
| 9131 | created['return'] = returnFiber; |
| 9132 | return created; |
| 9133 | } |
| 9134 | } |
| 9135 | |
| 9136 | function updatePortal(returnFiber, current, portal, expirationTime) { |
| 9137 | if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { |
no test coverage detected