(root: FiberRoot, updateLane: Lane)
| 818 | } |
| 819 | |
| 820 | export function markRootUpdated(root: FiberRoot, updateLane: Lane) { |
| 821 | root.pendingLanes |= updateLane; |
| 822 | if (enableDefaultTransitionIndicator) { |
| 823 | // Mark that this lane might need a loading indicator to be shown. |
| 824 | root.indicatorLanes |= updateLane & TransitionLanes; |
| 825 | } |
| 826 | |
| 827 | // If there are any suspended transitions, it's possible this new update |
| 828 | // could unblock them. Clear the suspended lanes so that we can try rendering |
| 829 | // them again. |
| 830 | // |
| 831 | // TODO: We really only need to unsuspend only lanes that are in the |
| 832 | // `subtreeLanes` of the updated fiber, or the update lanes of the return |
| 833 | // path. This would exclude suspended updates in an unrelated sibling tree, |
| 834 | // since there's no way for this update to unblock it. |
| 835 | // |
| 836 | // We don't do this if the incoming update is idle, because we never process |
| 837 | // idle updates until after all the regular updates have finished; there's no |
| 838 | // way it could unblock a transition. |
| 839 | if (updateLane !== IdleLane) { |
| 840 | root.suspendedLanes = NoLanes; |
| 841 | root.pingedLanes = NoLanes; |
| 842 | root.warmLanes = NoLanes; |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | export function markRootSuspended( |
| 847 | root: FiberRoot, |
no outgoing calls
no test coverage detected