Skip to content

Commit 473ee29

Browse files
committed
s/HTML/text for text hydration mismatches (#32763)
DiffTrain build for [3e88e97](3e88e97)
1 parent c06bad4 commit 473ee29

34 files changed

+234
-134
lines changed

compiled/facebook-www/REVISION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f134b3993a84d53cc99fe66b426ba13548f142ec
1+
3e88e97c116c7a1535976f2d4486bbf345476443
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f134b3993a84d53cc99fe66b426ba13548f142ec
1+
3e88e97c116c7a1535976f2d4486bbf345476443

compiled/facebook-www/React-dev.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ __DEV__ &&
15111511
exports.useTransition = function () {
15121512
return resolveDispatcher().useTransition();
15131513
};
1514-
exports.version = "19.1.0-www-classic-f134b399-20250326";
1514+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";
15151515
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15161516
"function" ===
15171517
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ __DEV__ &&
15111511
exports.useTransition = function () {
15121512
return resolveDispatcher().useTransition();
15131513
};
1514-
exports.version = "19.1.0-www-modern-f134b399-20250326";
1514+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";
15151515
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15161516
"function" ===
15171517
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,4 @@ exports.useSyncExternalStore = function (
624624
exports.useTransition = function () {
625625
return ReactSharedInternals.H.useTransition();
626626
};
627-
exports.version = "19.1.0-www-classic-f134b399-20250326";
627+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";

compiled/facebook-www/React-prod.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,4 +624,4 @@ exports.useSyncExternalStore = function (
624624
exports.useTransition = function () {
625625
return ReactSharedInternals.H.useTransition();
626626
};
627-
exports.version = "19.1.0-www-modern-f134b399-20250326";
627+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";

compiled/facebook-www/React-profiling.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ exports.useSyncExternalStore = function (
628628
exports.useTransition = function () {
629629
return ReactSharedInternals.H.useTransition();
630630
};
631-
exports.version = "19.1.0-www-classic-f134b399-20250326";
631+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";
632632
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
633633
"function" ===
634634
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ exports.useSyncExternalStore = function (
628628
exports.useTransition = function () {
629629
return ReactSharedInternals.H.useTransition();
630630
};
631-
exports.version = "19.1.0-www-modern-f134b399-20250326";
631+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";
632632
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
633633
"function" ===
634634
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -18194,10 +18194,10 @@ __DEV__ &&
1819418194
(function () {
1819518195
var internals = {
1819618196
bundleType: 1,
18197-
version: "19.1.0-www-classic-f134b399-20250326",
18197+
version: "19.1.0-www-classic-3e88e97c-20250326",
1819818198
rendererPackageName: "react-art",
1819918199
currentDispatcherRef: ReactSharedInternals,
18200-
reconcilerVersion: "19.1.0-www-classic-f134b399-20250326"
18200+
reconcilerVersion: "19.1.0-www-classic-3e88e97c-20250326"
1820118201
};
1820218202
internals.overrideHookState = overrideHookState;
1820318203
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18231,7 +18231,7 @@ __DEV__ &&
1823118231
exports.Shape = Shape;
1823218232
exports.Surface = Surface;
1823318233
exports.Text = Text;
18234-
exports.version = "19.1.0-www-classic-f134b399-20250326";
18234+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";
1823518235
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1823618236
"function" ===
1823718237
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17966,10 +17966,10 @@ __DEV__ &&
1796617966
(function () {
1796717967
var internals = {
1796817968
bundleType: 1,
17969-
version: "19.1.0-www-modern-f134b399-20250326",
17969+
version: "19.1.0-www-modern-3e88e97c-20250326",
1797017970
rendererPackageName: "react-art",
1797117971
currentDispatcherRef: ReactSharedInternals,
17972-
reconcilerVersion: "19.1.0-www-modern-f134b399-20250326"
17972+
reconcilerVersion: "19.1.0-www-modern-3e88e97c-20250326"
1797317973
};
1797417974
internals.overrideHookState = overrideHookState;
1797517975
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18003,7 +18003,7 @@ __DEV__ &&
1800318003
exports.Shape = Shape;
1800418004
exports.Surface = Surface;
1800518005
exports.Text = Text;
18006-
exports.version = "19.1.0-www-modern-f134b399-20250326";
18006+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";
1800718007
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1800818008
"function" ===
1800918009
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-prod.classic.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11146,10 +11146,10 @@ var slice = Array.prototype.slice,
1114611146
})(React.Component);
1114711147
var internals$jscomp$inline_1582 = {
1114811148
bundleType: 0,
11149-
version: "19.1.0-www-classic-f134b399-20250326",
11149+
version: "19.1.0-www-classic-3e88e97c-20250326",
1115011150
rendererPackageName: "react-art",
1115111151
currentDispatcherRef: ReactSharedInternals,
11152-
reconcilerVersion: "19.1.0-www-classic-f134b399-20250326"
11152+
reconcilerVersion: "19.1.0-www-classic-3e88e97c-20250326"
1115311153
};
1115411154
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1115511155
var hook$jscomp$inline_1583 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11175,4 +11175,4 @@ exports.RadialGradient = RadialGradient;
1117511175
exports.Shape = TYPES.SHAPE;
1117611176
exports.Surface = Surface;
1117711177
exports.Text = Text;
11178-
exports.version = "19.1.0-www-classic-f134b399-20250326";
11178+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";

compiled/facebook-www/ReactART-prod.modern.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10859,10 +10859,10 @@ var slice = Array.prototype.slice,
1085910859
})(React.Component);
1086010860
var internals$jscomp$inline_1555 = {
1086110861
bundleType: 0,
10862-
version: "19.1.0-www-modern-f134b399-20250326",
10862+
version: "19.1.0-www-modern-3e88e97c-20250326",
1086310863
rendererPackageName: "react-art",
1086410864
currentDispatcherRef: ReactSharedInternals,
10865-
reconcilerVersion: "19.1.0-www-modern-f134b399-20250326"
10865+
reconcilerVersion: "19.1.0-www-modern-3e88e97c-20250326"
1086610866
};
1086710867
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1086810868
var hook$jscomp$inline_1556 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10888,4 +10888,4 @@ exports.RadialGradient = RadialGradient;
1088810888
exports.Shape = TYPES.SHAPE;
1088910889
exports.Surface = Surface;
1089010890
exports.Text = Text;
10891-
exports.version = "19.1.0-www-modern-f134b399-20250326";
10891+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";

compiled/facebook-www/ReactDOM-dev.classic.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -3586,14 +3586,18 @@ __DEV__ &&
35863586
fiber.serverTail.push(rejectedCandidate)));
35873587
}
35883588
function throwOnHydrationMismatch(fiber) {
3589-
var diff = "",
3589+
var fromText =
3590+
1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1,
3591+
diff = "",
35903592
diffRoot = hydrationDiffRootDEV;
35913593
null !== diffRoot &&
35923594
((hydrationDiffRootDEV = null), (diff = describeDiff(diffRoot)));
35933595
queueHydrationError(
35943596
createCapturedValueAtFiber(
35953597
Error(
3596-
"Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" +
3598+
"Hydration failed because the server rendered " +
3599+
(fromText ? "text" : "HTML") +
3600+
" didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" +
35973601
diff
35983602
),
35993603
fiber
@@ -3692,7 +3696,7 @@ __DEV__ &&
36923696
: (didHydrate = !1);
36933697
!didHydrate &&
36943698
favorSafetyOverHydrationPerf &&
3695-
throwOnHydrationMismatch(fiber);
3699+
throwOnHydrationMismatch(fiber, !0);
36963700
}
36973701
function popToNextHostParent(fiber) {
36983702
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
@@ -12088,7 +12092,7 @@ __DEV__ &&
1208812092
: !1;
1208912093
!current &&
1209012094
favorSafetyOverHydrationPerf &&
12091-
throwOnHydrationMismatch(workInProgress);
12095+
throwOnHydrationMismatch(workInProgress, !0);
1209212096
} else
1209312097
(_type = renderLanes.ancestorInfo.current),
1209412098
null != _type &&
@@ -29908,11 +29912,11 @@ __DEV__ &&
2990829912
return_targetInst = null;
2990929913
(function () {
2991029914
var isomorphicReactPackageVersion = React.version;
29911-
if ("19.1.0-www-classic-f134b399-20250326" !== isomorphicReactPackageVersion)
29915+
if ("19.1.0-www-classic-3e88e97c-20250326" !== isomorphicReactPackageVersion)
2991229916
throw Error(
2991329917
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2991429918
(isomorphicReactPackageVersion +
29915-
"\n - react-dom: 19.1.0-www-classic-f134b399-20250326\nLearn more: https://react.dev/warnings/version-mismatch")
29919+
"\n - react-dom: 19.1.0-www-classic-3e88e97c-20250326\nLearn more: https://react.dev/warnings/version-mismatch")
2991629920
);
2991729921
})();
2991829922
("function" === typeof Map &&
@@ -29955,10 +29959,10 @@ __DEV__ &&
2995529959
!(function () {
2995629960
var internals = {
2995729961
bundleType: 1,
29958-
version: "19.1.0-www-classic-f134b399-20250326",
29962+
version: "19.1.0-www-classic-3e88e97c-20250326",
2995929963
rendererPackageName: "react-dom",
2996029964
currentDispatcherRef: ReactSharedInternals,
29961-
reconcilerVersion: "19.1.0-www-classic-f134b399-20250326"
29965+
reconcilerVersion: "19.1.0-www-classic-3e88e97c-20250326"
2996229966
};
2996329967
internals.overrideHookState = overrideHookState;
2996429968
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30556,7 +30560,7 @@ __DEV__ &&
3055630560
exports.useFormStatus = function () {
3055730561
return resolveDispatcher().useHostTransitionStatus();
3055830562
};
30559-
exports.version = "19.1.0-www-classic-f134b399-20250326";
30563+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";
3056030564
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3056130565
"function" ===
3056230566
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactDOM-dev.modern.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -3478,14 +3478,18 @@ __DEV__ &&
34783478
fiber.serverTail.push(rejectedCandidate)));
34793479
}
34803480
function throwOnHydrationMismatch(fiber) {
3481-
var diff = "",
3481+
var fromText =
3482+
1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1,
3483+
diff = "",
34823484
diffRoot = hydrationDiffRootDEV;
34833485
null !== diffRoot &&
34843486
((hydrationDiffRootDEV = null), (diff = describeDiff(diffRoot)));
34853487
queueHydrationError(
34863488
createCapturedValueAtFiber(
34873489
Error(
3488-
"Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" +
3490+
"Hydration failed because the server rendered " +
3491+
(fromText ? "text" : "HTML") +
3492+
" didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" +
34893493
diff
34903494
),
34913495
fiber
@@ -3579,7 +3583,7 @@ __DEV__ &&
35793583
: (didHydrate = !1);
35803584
!didHydrate &&
35813585
favorSafetyOverHydrationPerf &&
3582-
throwOnHydrationMismatch(fiber);
3586+
throwOnHydrationMismatch(fiber, !0);
35833587
}
35843588
function popToNextHostParent(fiber) {
35853589
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
@@ -11895,7 +11899,7 @@ __DEV__ &&
1189511899
: !1;
1189611900
!current &&
1189711901
favorSafetyOverHydrationPerf &&
11898-
throwOnHydrationMismatch(workInProgress);
11902+
throwOnHydrationMismatch(workInProgress, !0);
1189911903
} else
1190011904
(_type = renderLanes.ancestorInfo.current),
1190111905
null != _type &&
@@ -29694,11 +29698,11 @@ __DEV__ &&
2969429698
return_targetInst = null;
2969529699
(function () {
2969629700
var isomorphicReactPackageVersion = React.version;
29697-
if ("19.1.0-www-modern-f134b399-20250326" !== isomorphicReactPackageVersion)
29701+
if ("19.1.0-www-modern-3e88e97c-20250326" !== isomorphicReactPackageVersion)
2969829702
throw Error(
2969929703
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2970029704
(isomorphicReactPackageVersion +
29701-
"\n - react-dom: 19.1.0-www-modern-f134b399-20250326\nLearn more: https://react.dev/warnings/version-mismatch")
29705+
"\n - react-dom: 19.1.0-www-modern-3e88e97c-20250326\nLearn more: https://react.dev/warnings/version-mismatch")
2970229706
);
2970329707
})();
2970429708
("function" === typeof Map &&
@@ -29741,10 +29745,10 @@ __DEV__ &&
2974129745
!(function () {
2974229746
var internals = {
2974329747
bundleType: 1,
29744-
version: "19.1.0-www-modern-f134b399-20250326",
29748+
version: "19.1.0-www-modern-3e88e97c-20250326",
2974529749
rendererPackageName: "react-dom",
2974629750
currentDispatcherRef: ReactSharedInternals,
29747-
reconcilerVersion: "19.1.0-www-modern-f134b399-20250326"
29751+
reconcilerVersion: "19.1.0-www-modern-3e88e97c-20250326"
2974829752
};
2974929753
internals.overrideHookState = overrideHookState;
2975029754
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30342,7 +30346,7 @@ __DEV__ &&
3034230346
exports.useFormStatus = function () {
3034330347
return resolveDispatcher().useHostTransitionStatus();
3034430348
};
30345-
exports.version = "19.1.0-www-modern-f134b399-20250326";
30349+
exports.version = "19.1.0-www-modern-3e88e97c-20250326";
3034630350
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3034730351
"function" ===
3034830352
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactDOM-prod.classic.js

+18-8
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,15 @@ var hydrationParentFiber = null,
17841784
rootOrSingletonContext = !1,
17851785
HydrationMismatchException = Error(formatProdErrorMessage(519));
17861786
function throwOnHydrationMismatch(fiber) {
1787-
var error = Error(formatProdErrorMessage(418, ""));
1787+
var error = Error(
1788+
formatProdErrorMessage(
1789+
418,
1790+
1 < arguments.length && void 0 !== arguments[1] && arguments[1]
1791+
? "text"
1792+
: "HTML",
1793+
""
1794+
)
1795+
);
17881796
queueHydrationError(createCapturedValueAtFiber(error, fiber));
17891797
throw HydrationMismatchException;
17901798
}
@@ -1861,7 +1869,9 @@ function prepareToHydrateHostInstance(fiber) {
18611869
null != props.onClick && (instance.onclick = noop$1),
18621870
(instance = !0))
18631871
: (instance = !1);
1864-
!instance && favorSafetyOverHydrationPerf && throwOnHydrationMismatch(fiber);
1872+
!instance &&
1873+
favorSafetyOverHydrationPerf &&
1874+
throwOnHydrationMismatch(fiber, !0);
18651875
}
18661876
function popToNextHostParent(fiber) {
18671877
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
@@ -8035,7 +8045,7 @@ function completeWork(current, workInProgress, renderLanes) {
80358045
: !1;
80368046
!current &&
80378047
favorSafetyOverHydrationPerf &&
8038-
throwOnHydrationMismatch(workInProgress);
8048+
throwOnHydrationMismatch(workInProgress, !0);
80398049
} else
80408050
(current =
80418051
getOwnerDocumentFromRootContainer(current).createTextNode(
@@ -18791,14 +18801,14 @@ function getCrossOriginStringAs(as, input) {
1879118801
}
1879218802
var isomorphicReactPackageVersion$jscomp$inline_1974 = React.version;
1879318803
if (
18794-
"19.1.0-www-classic-f134b399-20250326" !==
18804+
"19.1.0-www-classic-3e88e97c-20250326" !==
1879518805
isomorphicReactPackageVersion$jscomp$inline_1974
1879618806
)
1879718807
throw Error(
1879818808
formatProdErrorMessage(
1879918809
527,
1880018810
isomorphicReactPackageVersion$jscomp$inline_1974,
18801-
"19.1.0-www-classic-f134b399-20250326"
18811+
"19.1.0-www-classic-3e88e97c-20250326"
1880218812
)
1880318813
);
1880418814
Internals.findDOMNode = function (componentOrElement) {
@@ -18816,10 +18826,10 @@ Internals.Events = [
1881618826
];
1881718827
var internals$jscomp$inline_2558 = {
1881818828
bundleType: 0,
18819-
version: "19.1.0-www-classic-f134b399-20250326",
18829+
version: "19.1.0-www-classic-3e88e97c-20250326",
1882018830
rendererPackageName: "react-dom",
1882118831
currentDispatcherRef: ReactSharedInternals,
18822-
reconcilerVersion: "19.1.0-www-classic-f134b399-20250326"
18832+
reconcilerVersion: "19.1.0-www-classic-3e88e97c-20250326"
1882318833
};
1882418834
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1882518835
var hook$jscomp$inline_2559 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -19183,4 +19193,4 @@ exports.useFormState = function (action, initialState, permalink) {
1918319193
exports.useFormStatus = function () {
1918419194
return ReactSharedInternals.H.useHostTransitionStatus();
1918519195
};
19186-
exports.version = "19.1.0-www-classic-f134b399-20250326";
19196+
exports.version = "19.1.0-www-classic-3e88e97c-20250326";

0 commit comments

Comments
 (0)