(returnFiber, currentFirstChild, portal, expirationTime)
| 17934 | } |
| 17935 | |
| 17936 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 17937 | var key = portal.key; |
| 17938 | var child = currentFirstChild; |
| 17939 | |
| 17940 | while (child !== null) { |
| 17941 | // TODO: If key === null and child.key === null, then this only applies to |
| 17942 | // the first item in the list. |
| 17943 | if (child.key === key) { |
| 17944 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 17945 | deleteRemainingChildren(returnFiber, child.sibling); |
| 17946 | var existing = useFiber(child, portal.children || []); |
| 17947 | existing.return = returnFiber; |
| 17948 | return existing; |
| 17949 | } else { |
| 17950 | deleteRemainingChildren(returnFiber, child); |
| 17951 | break; |
| 17952 | } |
| 17953 | } else { |
| 17954 | deleteChild(returnFiber, child); |
| 17955 | } |
| 17956 | |
| 17957 | child = child.sibling; |
| 17958 | } |
| 17959 | |
| 17960 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 17961 | created.return = returnFiber; |
| 17962 | return created; |
| 17963 | } // This API will tag the children with the side-effect of the reconciliation |
| 17964 | // itself. They will be added to the side-effect list as we pass through the |
| 17965 | // children and the parent. |
| 17966 |
no test coverage detected