Skip to content

Commit e4f3fc3

Browse files
committed
Don't let error boundaries catch errors during hydration (#28675)
When an error boundary catches an error during hydration it'll try to render the error state which will then try to hydrate that state, causing hydration warnings. When an error happens inside a Suspense boundary during hydration, we instead let the boundary catch it and restart a client render from there. However, when it's in the root we instead let it fail the root and do the sync recovery pass. This didn't consider that we might hit an error boundary first so this just skips the error boundary in that case. We should probably instead let the root do a concurrent client render in this same pass instead to unify with Suspense boundaries. DiffTrain build for commit 5d4b758.
1 parent 1cfd770 commit e4f3fc3

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1db853e0d856929a31f2401594157de8>>
10+
* @generated SignedSource<<9224411efbfa8776e575f8317a5cebc6>>
1111
*/
1212

1313
"use strict";
@@ -13796,7 +13796,6 @@ if (__DEV__) {
1379613796
}
1379713797

1379813798
case ClassComponent:
13799-
// Capture and retry
1380013799
var errorInfo = value;
1380113800
var ctor = workInProgress.type;
1380213801
var instance = workInProgress.stateNode;
@@ -26833,7 +26832,7 @@ if (__DEV__) {
2683326832
return root;
2683426833
}
2683526834

26836-
var ReactVersion = "19.0.0-canary-e5c5e99b";
26835+
var ReactVersion = "19.0.0-canary-74c595da";
2683726836

2683826837
// Might add PROFILE later.
2683926838

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2aed507a76a0b1524426c398897cbe47d80c51e5
1+
5d4b7587da52dd81bc5c366b909c4511e2970cd1

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<dbb809a434e7b6781bf5289b294a7b12>>
10+
* @generated SignedSource<<be8f8e1152affd8740c0c745720e9e1a>>
1111
*/
1212

1313
"use strict";
@@ -17446,7 +17446,6 @@ to return true:wantsResponderID| |
1744617446
}
1744717447

1744817448
case ClassComponent:
17449-
// Capture and retry
1745017449
var errorInfo = value;
1745117450
var ctor = workInProgress.type;
1745217451
var instance = workInProgress.stateNode;
@@ -30603,7 +30602,7 @@ to return true:wantsResponderID| |
3060330602
return root;
3060430603
}
3060530604

30606-
var ReactVersion = "19.0.0-canary-c6651440";
30605+
var ReactVersion = "19.0.0-canary-89cc0451";
3060730606

3060830607
function createPortal$1(
3060930608
children,

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<cf66f3f917e3c7a41bc8a26d1175d766>>
10+
* @generated SignedSource<<671deef2ff146cb90557b5929b5a868f>>
1111
*/
1212

1313
"use strict";
@@ -17717,7 +17717,6 @@ to return true:wantsResponderID| |
1771717717
}
1771817718

1771917719
case ClassComponent:
17720-
// Capture and retry
1772117720
var errorInfo = value;
1772217721
var ctor = workInProgress.type;
1772317722
var instance = workInProgress.stateNode;
@@ -31043,7 +31042,7 @@ to return true:wantsResponderID| |
3104331042
return root;
3104431043
}
3104531044

31046-
var ReactVersion = "19.0.0-canary-09379a47";
31045+
var ReactVersion = "19.0.0-canary-5f8abb5a";
3104731046

3104831047
function createPortal$1(
3104931048
children,

0 commit comments

Comments
 (0)