(current, workInProgress, renderLanes)
| 19906 | } |
| 19907 | |
| 19908 | function updateHostComponent(current, workInProgress, renderLanes) { |
| 19909 | pushHostContext(workInProgress); |
| 19910 | |
| 19911 | if (current === null) { |
| 19912 | tryToClaimNextHydratableInstance(workInProgress); |
| 19913 | } |
| 19914 | |
| 19915 | var type = workInProgress.type; |
| 19916 | var nextProps = workInProgress.pendingProps; |
| 19917 | var prevProps = current !== null ? current.memoizedProps : null; |
| 19918 | var nextChildren = nextProps.children; |
| 19919 | var isDirectTextChild = shouldSetTextContent(type, nextProps); |
| 19920 | |
| 19921 | if (isDirectTextChild) { |
| 19922 | // We special case a direct text child of a host node. This is a common |
| 19923 | // case. We won't handle it as a reified child. We will instead handle |
| 19924 | // this in the host environment that also has access to this prop. That |
| 19925 | // avoids allocating another HostText fiber and traversing it. |
| 19926 | nextChildren = null; |
| 19927 | } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { |
| 19928 | // If we're switching from a direct text child to a normal child, or to |
| 19929 | // empty, we need to schedule the text content to be reset. |
| 19930 | workInProgress.flags |= ContentReset; |
| 19931 | } |
| 19932 | |
| 19933 | markRef(current, workInProgress); |
| 19934 | reconcileChildren(current, workInProgress, nextChildren, renderLanes); |
| 19935 | return workInProgress.child; |
| 19936 | } |
| 19937 | |
| 19938 | function updateHostText(current, workInProgress) { |
| 19939 | if (current === null) { |
no test coverage detected
searching dependent graphs…