GeezerVison is showing github.com — root.hydrate -> root.isDehydrated (#22420) · react/react@029fdce
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/events/ReactDOMEventListener.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -264,7 +264,7 @@ export function attemptToDispatchEvent( | 264 | 264 | targetInst = null; | 265 | 265 | } else if (tag === HostRoot) { | 266 | 266 | const root: FiberRoot = nearestMounted.stateNode; | 267 | | - if (root.hydrate) { | | 267 | + if (root.isDehydrated) { | 268 | 268 | // If this happens during a replay something went wrong and it might block | 269 | 269 | // the whole system. | 270 | 270 | return getContainerFromFiber(nearestMounted); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/events/ReactDOMEventReplaying.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -399,7 +399,7 @@ function attemptExplicitHydrationTarget( | 399 | 399 | } | 400 | 400 | } else if (tag === HostRoot) { | 401 | 401 | const root: FiberRoot = nearestMounted.stateNode; | 402 | | - if (root.hydrate) { | | 402 | + if (root.isDehydrated) { | 403 | 403 | queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); | 404 | 404 | // We don't currently have a way to increase the priority of | 405 | 405 | // a root other than sync. | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberBeginWork.new.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1295,7 +1295,7 @@ function updateHostRoot(current, workInProgress, renderLanes) { | 1295 | 1295 | resetHydrationState(); | 1296 | 1296 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); | 1297 | 1297 | } | 1298 | | - if (root.hydrate && enterHydrationState(workInProgress)) { | | 1298 | + if (root.isDehydrated && enterHydrationState(workInProgress)) { | 1299 | 1299 | // If we don't have any current children this might be the first pass. | 1300 | 1300 | // We always try to hydrate. If this isn't a hydration pass there won't | 1301 | 1301 | // be any children to hydrate which is effectively the same thing as | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberBeginWork.old.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1295,7 +1295,7 @@ function updateHostRoot(current, workInProgress, renderLanes) { | 1295 | 1295 | resetHydrationState(); | 1296 | 1296 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); | 1297 | 1297 | } | 1298 | | - if (root.hydrate && enterHydrationState(workInProgress)) { | | 1298 | + if (root.isDehydrated && enterHydrationState(workInProgress)) { | 1299 | 1299 | // If we don't have any current children this might be the first pass. | 1300 | 1300 | // We always try to hydrate. If this isn't a hydration pass there won't | 1301 | 1301 | // be any children to hydrate which is effectively the same thing as | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberCommitWork.new.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1827,9 +1827,9 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void { | 1827 | 1827 | case HostRoot: { | 1828 | 1828 | if (supportsHydration) { | 1829 | 1829 | const root: FiberRoot = finishedWork.stateNode; | 1830 | | - if (root.hydrate) { | | 1830 | + if (root.isDehydrated) { | 1831 | 1831 | // We've just hydrated. No need to hydrate again. | 1832 | | - root.hydrate = false; | | 1832 | + root.isDehydrated = false; | 1833 | 1833 | commitHydratedContainer(root.containerInfo); | 1834 | 1834 | } | 1835 | 1835 | } | @@ -1933,9 +1933,9 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void { | 1933 | 1933 | case HostRoot: { | 1934 | 1934 | if (supportsHydration) { | 1935 | 1935 | const root: FiberRoot = finishedWork.stateNode; | 1936 | | - if (root.hydrate) { | | 1936 | + if (root.isDehydrated) { | 1937 | 1937 | // We've just hydrated. No need to hydrate again. | 1938 | | - root.hydrate = false; | | 1938 | + root.isDehydrated = false; | 1939 | 1939 | commitHydratedContainer(root.containerInfo); | 1940 | 1940 | } | 1941 | 1941 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberCommitWork.old.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1827,9 +1827,9 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void { | 1827 | 1827 | case HostRoot: { | 1828 | 1828 | if (supportsHydration) { | 1829 | 1829 | const root: FiberRoot = finishedWork.stateNode; | 1830 | | - if (root.hydrate) { | | 1830 | + if (root.isDehydrated) { | 1831 | 1831 | // We've just hydrated. No need to hydrate again. | 1832 | | - root.hydrate = false; | | 1832 | + root.isDehydrated = false; | 1833 | 1833 | commitHydratedContainer(root.containerInfo); | 1834 | 1834 | } | 1835 | 1835 | } | @@ -1933,9 +1933,9 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void { | 1933 | 1933 | case HostRoot: { | 1934 | 1934 | if (supportsHydration) { | 1935 | 1935 | const root: FiberRoot = finishedWork.stateNode; | 1936 | | - if (root.hydrate) { | | 1936 | + if (root.isDehydrated) { | 1937 | 1937 | // We've just hydrated. No need to hydrate again. | 1938 | | - root.hydrate = false; | | 1938 | + root.isDehydrated = false; | 1939 | 1939 | commitHydratedContainer(root.containerInfo); | 1940 | 1940 | } | 1941 | 1941 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberCompleteWork.new.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -867,7 +867,7 @@ function completeWork( | 867 | 867 | // If we hydrated, then we'll need to schedule an update for | 868 | 868 | // the commit side-effects on the root. | 869 | 869 | markUpdate(workInProgress); | 870 | | - } else if (!fiberRoot.hydrate) { | | 870 | + } else if (!fiberRoot.isDehydrated) { | 871 | 871 | // Schedule an effect to clear this container at the start of the next commit. | 872 | 872 | // This handles the case of React rendering into a container with previous children. | 873 | 873 | // It's also safe to do for updates too, because current.child would only be null | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberCompleteWork.old.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -867,7 +867,7 @@ function completeWork( | 867 | 867 | // If we hydrated, then we'll need to schedule an update for | 868 | 868 | // the commit side-effects on the root. | 869 | 869 | markUpdate(workInProgress); | 870 | | - } else if (!fiberRoot.hydrate) { | | 870 | + } else if (!fiberRoot.isDehydrated) { | 871 | 871 | // Schedule an effect to clear this container at the start of the next commit. | 872 | 872 | // This handles the case of React rendering into a container with previous children. | 873 | 873 | // It's also safe to do for updates too, because current.child would only be null | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberReconciler.new.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -353,7 +353,7 @@ export function attemptSynchronousHydration(fiber: Fiber): void { | 353 | 353 | switch (fiber.tag) { | 354 | 354 | case HostRoot: | 355 | 355 | const root: FiberRoot = fiber.stateNode; | 356 | | - if (root.hydrate) { | | 356 | + if (root.isDehydrated) { | 357 | 357 | // Flush the first scheduled "update". | 358 | 358 | const lanes = getHighestPriorityPendingLanes(root); | 359 | 359 | flushRoot(root, lanes); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberReconciler.old.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -353,7 +353,7 @@ export function attemptSynchronousHydration(fiber: Fiber): void { | 353 | 353 | switch (fiber.tag) { | 354 | 354 | case HostRoot: | 355 | 355 | const root: FiberRoot = fiber.stateNode; | 356 | | - if (root.hydrate) { | | 356 | + if (root.isDehydrated) { | 357 | 357 | // Flush the first scheduled "update". | 358 | 358 | const lanes = getHighestPriorityPendingLanes(root); | 359 | 359 | flushRoot(root, lanes); | |
|