(current, workInProgress, renderExpirationTime)
| 9820 | } |
| 9821 | |
| 9822 | function beginWork(current, workInProgress, renderExpirationTime) { |
| 9823 | if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) { |
| 9824 | return bailoutOnLowPriority(current, workInProgress); |
| 9825 | } |
| 9826 | |
| 9827 | switch (workInProgress.tag) { |
| 9828 | case IndeterminateComponent: |
| 9829 | return mountIndeterminateComponent(current, workInProgress, renderExpirationTime); |
| 9830 | case FunctionalComponent: |
| 9831 | return updateFunctionalComponent(current, workInProgress); |
| 9832 | case ClassComponent: |
| 9833 | return updateClassComponent(current, workInProgress, renderExpirationTime); |
| 9834 | case HostRoot: |
| 9835 | return updateHostRoot(current, workInProgress, renderExpirationTime); |
| 9836 | case HostComponent: |
| 9837 | return updateHostComponent(current, workInProgress, renderExpirationTime); |
| 9838 | case HostText: |
| 9839 | return updateHostText(current, workInProgress); |
| 9840 | case CallHandlerPhase: |
| 9841 | // This is a restart. Reset the tag to the initial phase. |
| 9842 | workInProgress.tag = CallComponent; |
| 9843 | // Intentionally fall through since this is now the same. |
| 9844 | case CallComponent: |
| 9845 | return updateCallComponent(current, workInProgress, renderExpirationTime); |
| 9846 | case ReturnComponent: |
| 9847 | // A return component is just a placeholder, we can just run through the |
| 9848 | // next one immediately. |
| 9849 | return null; |
| 9850 | case HostPortal: |
| 9851 | return updatePortalComponent(current, workInProgress, renderExpirationTime); |
| 9852 | case ForwardRef: |
| 9853 | return updateForwardRef(current, workInProgress); |
| 9854 | case Fragment: |
| 9855 | return updateFragment(current, workInProgress); |
| 9856 | case Mode: |
| 9857 | return updateMode(current, workInProgress); |
| 9858 | case ContextProvider: |
| 9859 | return updateContextProvider(current, workInProgress, renderExpirationTime); |
| 9860 | case ContextConsumer: |
| 9861 | return updateContextConsumer(current, workInProgress, renderExpirationTime); |
| 9862 | default: |
| 9863 | invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'); |
| 9864 | } |
| 9865 | } |
| 9866 | |
| 9867 | return { |
| 9868 | beginWork: beginWork |
no test coverage detected