(current, workInProgress, renderExpirationTime)
| 10496 | } |
| 10497 | |
| 10498 | function beginWork(current, workInProgress, renderExpirationTime) { |
| 10499 | if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) { |
| 10500 | return bailoutOnLowPriority(current, workInProgress); |
| 10501 | } |
| 10502 | |
| 10503 | switch (workInProgress.tag) { |
| 10504 | case IndeterminateComponent: |
| 10505 | return mountIndeterminateComponent(current, workInProgress, renderExpirationTime); |
| 10506 | case FunctionalComponent: |
| 10507 | return updateFunctionalComponent(current, workInProgress); |
| 10508 | case ClassComponent: |
| 10509 | return updateClassComponent(current, workInProgress, renderExpirationTime); |
| 10510 | case HostRoot: |
| 10511 | return updateHostRoot(current, workInProgress, renderExpirationTime); |
| 10512 | case HostComponent: |
| 10513 | return updateHostComponent(current, workInProgress, renderExpirationTime); |
| 10514 | case HostText: |
| 10515 | return updateHostText(current, workInProgress); |
| 10516 | case CallHandlerPhase: |
| 10517 | // This is a restart. Reset the tag to the initial phase. |
| 10518 | workInProgress.tag = CallComponent; |
| 10519 | // Intentionally fall through since this is now the same. |
| 10520 | case CallComponent: |
| 10521 | return updateCallComponent(current, workInProgress, renderExpirationTime); |
| 10522 | case ReturnComponent: |
| 10523 | // A return component is just a placeholder, we can just run through the |
| 10524 | // next one immediately. |
| 10525 | return null; |
| 10526 | case HostPortal: |
| 10527 | return updatePortalComponent(current, workInProgress, renderExpirationTime); |
| 10528 | case ForwardRef: |
| 10529 | return updateForwardRef(current, workInProgress); |
| 10530 | case Fragment: |
| 10531 | return updateFragment(current, workInProgress); |
| 10532 | case Mode: |
| 10533 | return updateMode(current, workInProgress); |
| 10534 | case ContextProvider: |
| 10535 | return updateContextProvider(current, workInProgress, renderExpirationTime); |
| 10536 | case ContextConsumer: |
| 10537 | return updateContextConsumer(current, workInProgress, renderExpirationTime); |
| 10538 | default: |
| 10539 | invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'); |
| 10540 | } |
| 10541 | } |
| 10542 | |
| 10543 | return { |
| 10544 | beginWork: beginWork |
no test coverage detected