You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx
+1-1
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ export function PseudoHtmlDiff({
// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference
19
19
consthtmlTagsWarnings=newSet([
20
-
'In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s',
21
-
'In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s',
22
-
'In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.',
23
-
"In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.",
20
+
'Warning: In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s',
21
+
'Warning: In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s',
22
+
'Warning: In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.',
23
+
"Warning: In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.",
24
+
'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s',
25
+
'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s',
24
26
])
27
+
consttextAndTagsMismatchWarnings=newSet([
28
+
'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s',
29
+
'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s',
30
+
])
31
+
consttextMismatchWarning=
32
+
'Warning: Text content did not match. Server: "%s" Client: "%s"%s'
33
+
34
+
exportconstgetHydrationWarningType=(
35
+
message: NullableText
36
+
): 'tag'|'text'|'text-in-tag'=>{
37
+
if(typeofmessage!=='string'){
38
+
// TODO: Doesn't make sense to treat no message as a hydration error message.
0 commit comments