Remove errorHydratingContainer (#28664)

I originally added this in #21021 but I didn't mention why and I don't
quite remember why. Maybe because there were no other message? However
at the time the recoverable errors mechanism didn't exist.

Today I believe all cases where this happens will trigger another
recoverable error. Namely these two:

https://github.com/facebook/react/blob/9f33f699e4f832971dc0f2047129f832655a3b6d/packages/react-reconciler/src/ReactFiberBeginWork.js#L1442-L1446

https://github.com/facebook/react/blob/9f33f699e4f832971dc0f2047129f832655a3b6d/packages/react-reconciler/src/ReactFiberBeginWork.js#L2962-L2965

Therefore this is just an extra unnecessary log.

DiffTrain build for [323b6e98a7](https://github.com/facebook/react/commit/323b6e98a76fe6ee721f10d327a9a682334d1a97)
This commit is contained in:
sebmarkbage
2024-03-28 03:52:59 +00:00
parent ab2961cf4d
commit 3c7faae3ba
6 changed files with 5 additions and 62 deletions
+1 -1
View File
@@ -1 +1 @@
9f33f699e4f832971dc0f2047129f832655a3b6d
323b6e98a76fe6ee721f10d327a9a682334d1a97
+1 -15
View File
@@ -8922,16 +8922,6 @@ if (__DEV__) {
return true;
}
function errorHydratingContainer(parentContainer) {
{
// TODO: This gets logged by onRecoverableError, too, so we should be
// able to remove it.
error(
"An error occurred during hydration. The server HTML was replaced with client content."
);
}
}
function warnNonHydratedInstance(fiber, rejectedCandidate) {
{
if (didSuspendOrErrorDEV) {
@@ -32068,10 +32058,6 @@ if (__DEV__) {
// Something to consider for a future refactor.
var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer();
}
}
var exitStatus = renderRootSync(root, errorRetryLanes);
@@ -36345,7 +36331,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-classic-06295a1e";
var ReactVersion = "19.0.0-www-classic-c7ac3967";
function createPortal$1(
children,
+1 -15
View File
@@ -8885,16 +8885,6 @@ if (__DEV__) {
return true;
}
function errorHydratingContainer(parentContainer) {
{
// TODO: This gets logged by onRecoverableError, too, so we should be
// able to remove it.
error(
"An error occurred during hydration. The server HTML was replaced with client content."
);
}
}
function warnNonHydratedInstance(fiber, rejectedCandidate) {
{
if (didSuspendOrErrorDEV) {
@@ -31925,10 +31915,6 @@ if (__DEV__) {
// Something to consider for a future refactor.
var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer();
}
}
var exitStatus = renderRootSync(root, errorRetryLanes);
@@ -36193,7 +36179,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-modern-2340f8c4";
var ReactVersion = "19.0.0-www-modern-40561912";
function createPortal$1(
children,
@@ -9059,16 +9059,6 @@ if (__DEV__) {
return true;
}
function errorHydratingContainer(parentContainer) {
{
// TODO: This gets logged by onRecoverableError, too, so we should be
// able to remove it.
error(
"An error occurred during hydration. The server HTML was replaced with client content."
);
}
}
function warnNonHydratedInstance(fiber, rejectedCandidate) {
{
if (didSuspendOrErrorDEV) {
@@ -32692,10 +32682,6 @@ if (__DEV__) {
// Something to consider for a future refactor.
var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer();
}
}
var exitStatus = renderRootSync(root, errorRetryLanes);
@@ -36969,7 +36955,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-classic-542ebce8";
var ReactVersion = "19.0.0-www-classic-7d6a5e18";
function createPortal$1(
children,
@@ -9022,16 +9022,6 @@ if (__DEV__) {
return true;
}
function errorHydratingContainer(parentContainer) {
{
// TODO: This gets logged by onRecoverableError, too, so we should be
// able to remove it.
error(
"An error occurred during hydration. The server HTML was replaced with client content."
);
}
}
function warnNonHydratedInstance(fiber, rejectedCandidate) {
{
if (didSuspendOrErrorDEV) {
@@ -32549,10 +32539,6 @@ if (__DEV__) {
// Something to consider for a future refactor.
var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer();
}
}
var exitStatus = renderRootSync(root, errorRetryLanes);
@@ -36817,7 +36803,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-www-modern-e8df89fb";
var ReactVersion = "19.0.0-www-modern-0276b2d8";
function createPortal$1(
children,
@@ -84,7 +84,6 @@ export default [
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.",
"An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.",
"An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.",
"An error occurred during hydration. The server HTML was replaced with client content.",
"An input can only specify a formAction along with type=\"submit\" or type=\"image\".",
"An invalid container has been provided. This may indicate that another renderer is being used in addition to the test renderer. (For example, ReactDOM.createPortal inside of a ReactTestRenderer tree.) This is not supported.",
"An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition.",