mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fix comments: expiration time -> lanes (#21551)
This commit is contained in:
@@ -389,7 +389,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
|
||||
workInProgressRootRenderLanes !== NoLanes
|
||||
) {
|
||||
// This is a render phase update. These are not officially supported. The
|
||||
// old behavior is to give this the same "thread" (expiration time) as
|
||||
// old behavior is to give this the same "thread" (lanes) as
|
||||
// whatever is currently rendering. So if you call `setState` on a component
|
||||
// that happens later in the same render, it will flush. Ideally, we want to
|
||||
// remove the special case and treat them as if they came from an
|
||||
@@ -756,7 +756,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
}
|
||||
|
||||
// Determine the next expiration time to work on, using the fields stored
|
||||
// Determine the next lanes to work on, using the fields stored
|
||||
// on the root.
|
||||
let lanes = getNextLanes(
|
||||
root,
|
||||
@@ -1629,7 +1629,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
|
||||
// capture values if possible.
|
||||
const next = unwindWork(completedWork, subtreeRenderLanes);
|
||||
|
||||
// Because this fiber did not complete, don't reset its expiration time.
|
||||
// Because this fiber did not complete, don't reset its lanes.
|
||||
|
||||
if (next !== null) {
|
||||
// If completing this work spawned new work, do that next. We'll come
|
||||
@@ -2308,7 +2308,7 @@ function retryTimedOutBoundary(boundaryFiber: Fiber, retryLane: Lane) {
|
||||
// The boundary fiber (a Suspense component or SuspenseList component)
|
||||
// previously was rendered in its fallback state. One of the promises that
|
||||
// suspended it has resolved, which means at least part of the tree was
|
||||
// likely unblocked. Try rendering again, at a new expiration time.
|
||||
// likely unblocked. Try rendering again, at a new lanes.
|
||||
if (retryLane === NoLane) {
|
||||
// TODO: Assign this to `suspenseState.retryLane`? to avoid
|
||||
// unnecessary entanglement?
|
||||
|
||||
@@ -389,7 +389,7 @@ export function requestUpdateLane(fiber: Fiber): Lane {
|
||||
workInProgressRootRenderLanes !== NoLanes
|
||||
) {
|
||||
// This is a render phase update. These are not officially supported. The
|
||||
// old behavior is to give this the same "thread" (expiration time) as
|
||||
// old behavior is to give this the same "thread" (lanes) as
|
||||
// whatever is currently rendering. So if you call `setState` on a component
|
||||
// that happens later in the same render, it will flush. Ideally, we want to
|
||||
// remove the special case and treat them as if they came from an
|
||||
@@ -756,7 +756,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
}
|
||||
|
||||
// Determine the next expiration time to work on, using the fields stored
|
||||
// Determine the next lanes to work on, using the fields stored
|
||||
// on the root.
|
||||
let lanes = getNextLanes(
|
||||
root,
|
||||
@@ -1629,7 +1629,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
|
||||
// capture values if possible.
|
||||
const next = unwindWork(completedWork, subtreeRenderLanes);
|
||||
|
||||
// Because this fiber did not complete, don't reset its expiration time.
|
||||
// Because this fiber did not complete, don't reset its lanes.
|
||||
|
||||
if (next !== null) {
|
||||
// If completing this work spawned new work, do that next. We'll come
|
||||
@@ -2308,7 +2308,7 @@ function retryTimedOutBoundary(boundaryFiber: Fiber, retryLane: Lane) {
|
||||
// The boundary fiber (a Suspense component or SuspenseList component)
|
||||
// previously was rendered in its fallback state. One of the promises that
|
||||
// suspended it has resolved, which means at least part of the tree was
|
||||
// likely unblocked. Try rendering again, at a new expiration time.
|
||||
// likely unblocked. Try rendering again, at a new lanes.
|
||||
if (retryLane === NoLane) {
|
||||
// TODO: Assign this to `suspenseState.retryLane`? to avoid
|
||||
// unnecessary entanglement?
|
||||
|
||||
Reference in New Issue
Block a user