Skip to content

Commit

Permalink
Remove errorHydratingContainer (#28664)
Browse files Browse the repository at this point in the history
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 [323b6e9](323b6e9)
  • Loading branch information
sebmarkbage committed Mar 28, 2024
1 parent ab2961c commit 3c7faae
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 62 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9f33f699e4f832971dc0f2047129f832655a3b6d
323b6e98a76fe6ee721f10d327a9a682334d1a97
16 changes: 1 addition & 15 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 1 addition & 15 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 1 addition & 15 deletions compiled/facebook-www/ReactDOMTesting-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 1 addition & 15 deletions compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion compiled/facebook-www/__test_utils__/ReactAllWarnings.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c7faae

Please sign in to comment.