fix comments: expiration time -> lanes (#21551)
Shannon Feng committed
Jun 5, 2021 at 22:19 UTC
b610fec00cef1fb0a33ea353ed81fd138b961785
2 files changed
+8
-8
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+4
-4
@@ -389,7 +389,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
389
workInProgressRootRenderLanes !== NoLanes
390
) {
391
// This is a render phase update. These are not officially supported. The
392
- // old behavior is to give this the same "thread" (expiration time) as
392
+ // old behavior is to give this the same "thread" (lanes) as
393
// whatever is currently rendering. So if you call `setState` on a component
394
// that happens later in the same render, it will flush. Ideally, we want to
395
// remove the special case and treat them as if they came from an
@@ -756,7 +756,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
756
}
757
}
758
759
- // Determine the next expiration time to work on, using the fields stored
759
+ // Determine the next lanes to work on, using the fields stored
760
// on the root.
761
let lanes = getNextLanes(
762
root,
@@ -1629,7 +1629,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
1629
// capture values if possible.
1630
const next = unwindWork(completedWork, subtreeRenderLanes);
1631
1632
- // Because this fiber did not complete, don't reset its expiration time.
1632
+ // Because this fiber did not complete, don't reset its lanes.
1633
1634
if (next !== null) {
1635
// If completing this work spawned new work, do that next. We'll come
@@ -2308,7 +2308,7 @@ function retryTimedOutBoundary(boundaryFiber: Fiber, retryLane: Lane) {
2308
// The boundary fiber (a Suspense component or SuspenseList component)
2309
// previously was rendered in its fallback state. One of the promises that
2310
// suspended it has resolved, which means at least part of the tree was
2311
- // likely unblocked. Try rendering again, at a new expiration time.
2311
+ // likely unblocked. Try rendering again, at a new lanes.
2312
if (retryLane === NoLane) {
2313
// TODO: Assign this to `suspenseState.retryLane`? to avoid
2314
// unnecessary entanglement?
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+4
-4
@@ -389,7 +389,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
389
workInProgressRootRenderLanes !== NoLanes
390
) {
391
// This is a render phase update. These are not officially supported. The
392
- // old behavior is to give this the same "thread" (expiration time) as
392
+ // old behavior is to give this the same "thread" (lanes) as
393
// whatever is currently rendering. So if you call `setState` on a component
394
// that happens later in the same render, it will flush. Ideally, we want to
395
// remove the special case and treat them as if they came from an
@@ -756,7 +756,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
756
}
757
}
758
759
- // Determine the next expiration time to work on, using the fields stored
759
+ // Determine the next lanes to work on, using the fields stored
760
// on the root.
761
let lanes = getNextLanes(
762
root,
@@ -1629,7 +1629,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
1629
// capture values if possible.
1630
const next = unwindWork(completedWork, subtreeRenderLanes);
1631
1632
- // Because this fiber did not complete, don't reset its expiration time.
1632
+ // Because this fiber did not complete, don't reset its lanes.
1633
1634
if (next !== null) {
1635
// If completing this work spawned new work, do that next. We'll come
@@ -2308,7 +2308,7 @@ function retryTimedOutBoundary(boundaryFiber: Fiber, retryLane: Lane) {
2308
// The boundary fiber (a Suspense component or SuspenseList component)
2309
// previously was rendered in its fallback state. One of the promises that
2310
// suspended it has resolved, which means at least part of the tree was
2311
- // likely unblocked. Try rendering again, at a new expiration time.
2311
+ // likely unblocked. Try rendering again, at a new lanes.
2312
if (retryLane === NoLane) {
2313
// TODO: Assign this to `suspenseState.retryLane`? to avoid
2314
// unnecessary entanglement?