(current, workInProgress, renderLanes)
| 19935 | } |
| 19936 | |
| 19937 | function updateHostComponent(current, workInProgress, renderLanes) { |
| 19938 | pushHostContext(workInProgress); |
| 19939 | |
| 19940 | if (current === null) { |
| 19941 | tryToClaimNextHydratableInstance(workInProgress); |
| 19942 | } |
| 19943 | |
| 19944 | var type = workInProgress.type; |
| 19945 | var nextProps = workInProgress.pendingProps; |
| 19946 | var prevProps = current !== null ? current.memoizedProps : null; |
| 19947 | var nextChildren = nextProps.children; |
| 19948 | var isDirectTextChild = shouldSetTextContent(type, nextProps); |
| 19949 | |
| 19950 | if (isDirectTextChild) { |
| 19951 | // We special case a direct text child of a host node. This is a common |
| 19952 | // case. We won't handle it as a reified child. We will instead handle |
| 19953 | // this in the host environment that also has access to this prop. That |
| 19954 | // avoids allocating another HostText fiber and traversing it. |
| 19955 | nextChildren = null; |
| 19956 | } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { |
| 19957 | // If we're switching from a direct text child to a normal child, or to |
| 19958 | // empty, we need to schedule the text content to be reset. |
| 19959 | workInProgress.flags |= ContentReset; |
| 19960 | } |
| 19961 | |
| 19962 | markRef(current, workInProgress); |
| 19963 | reconcileChildren(current, workInProgress, nextChildren, renderLanes); |
| 19964 | return workInProgress.child; |
| 19965 | } |
| 19966 | |
| 19967 | function updateHostText(current, workInProgress) { |
| 19968 | if (current === null) { |
no test coverage detected
searching dependent graphs…