Skip to content

Commit de5c5a3

Browse files
committed
fixes
1 parent f724e4d commit de5c5a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-reconciler/src/ReactFiberHydrationContext.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export const HydrationMismatchException: mixed = new Error(
308308
"userspace. If you're seeing this, it's likely a bug in React.",
309309
);
310310

311-
function throwOnHydrationMismatch(fiber: Fiber, fromText = false) {
311+
function throwOnHydrationMismatch(fiber: Fiber, fromText: boolean = false) {
312312
let diff = '';
313313
if (__DEV__) {
314314
// Consume the diff root for this mismatch.

scripts/error-codes/codes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
"415": "Error parsing the data. It's probably an error code or network corruption.",
404404
"416": "This environment don't support binary chunks.",
405405
"417": "React currently only supports piping to one writable stream.",
406-
"418": "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%s",
406+
"418": "Hydration failed because the server rendered %s 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%s",
407407
"419": "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.",
408408
"420": "ServerContext: %s already defined",
409409
"421": "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.",

0 commit comments

Comments
 (0)