(current, workInProgress, renderExpirationTime)
| 10589 | } |
| 10590 | |
| 10591 | function beginWork(current, workInProgress, renderExpirationTime) { |
| 10592 | if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) { |
| 10593 | return bailoutOnLowPriority(current, workInProgress); |
| 10594 | } |
| 10595 | |
| 10596 | switch (workInProgress.tag) { |
| 10597 | case IndeterminateComponent: |
| 10598 | return mountIndeterminateComponent(current, workInProgress, renderExpirationTime); |
| 10599 | case FunctionalComponent: |
| 10600 | return updateFunctionalComponent(current, workInProgress); |
| 10601 | case ClassComponent: |
| 10602 | return updateClassComponent(current, workInProgress, renderExpirationTime); |
| 10603 | case HostRoot: |
| 10604 | return updateHostRoot(current, workInProgress, renderExpirationTime); |
| 10605 | case HostComponent: |
| 10606 | return updateHostComponent(current, workInProgress, renderExpirationTime); |
| 10607 | case HostText: |
| 10608 | return updateHostText(current, workInProgress); |
| 10609 | case CallHandlerPhase: |
| 10610 | // This is a restart. Reset the tag to the initial phase. |
| 10611 | workInProgress.tag = CallComponent; |
| 10612 | // Intentionally fall through since this is now the same. |
| 10613 | case CallComponent: |
| 10614 | return updateCallComponent(current, workInProgress, renderExpirationTime); |
| 10615 | case ReturnComponent: |
| 10616 | // A return component is just a placeholder, we can just run through the |
| 10617 | // next one immediately. |
| 10618 | return null; |
| 10619 | case HostPortal: |
| 10620 | return updatePortalComponent(current, workInProgress, renderExpirationTime); |
| 10621 | case ForwardRef: |
| 10622 | return updateForwardRef(current, workInProgress); |
| 10623 | case Fragment: |
| 10624 | return updateFragment(current, workInProgress); |
| 10625 | case Mode: |
| 10626 | return updateMode(current, workInProgress); |
| 10627 | case ContextProvider: |
| 10628 | return updateContextProvider(current, workInProgress, renderExpirationTime); |
| 10629 | case ContextConsumer: |
| 10630 | return updateContextConsumer(current, workInProgress, renderExpirationTime); |
| 10631 | default: |
| 10632 | invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'); |
| 10633 | } |
| 10634 | } |
| 10635 | |
| 10636 | return { |
| 10637 | beginWork: beginWork |
no test coverage detected