Skip to content

Commit

Permalink
Add component stack to previously missed hydrate warnings (facebook#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
sompylasar committed Jun 8, 2018
1 parent 28cbe05 commit 4e42d23
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 83 deletions.
9 changes: 6 additions & 3 deletions packages/react-dom/src/client/ReactDOMFiberComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,10 @@ export function warnForDeletedHydratableElement(
didWarnInvalidHydration = true;
warning(
false,
'Did not expect server HTML to contain a <%s> in <%s>.',
'Did not expect server HTML to contain a <%s> in <%s>.%s',
child.nodeName.toLowerCase(),
parentNode.nodeName.toLowerCase(),
getStack(),
);
}
}
Expand All @@ -1146,9 +1147,10 @@ export function warnForDeletedHydratableText(
didWarnInvalidHydration = true;
warning(
false,
'Did not expect server HTML to contain the text node "%s" in <%s>.',
'Did not expect server HTML to contain the text node "%s" in <%s>.%s',
child.nodeValue,
parentNode.nodeName.toLowerCase(),
getStack(),
);
}
}
Expand Down Expand Up @@ -1191,9 +1193,10 @@ export function warnForInsertedHydratedText(
didWarnInvalidHydration = true;
warning(
false,
'Expected server HTML to contain a matching text node for "%s" in <%s>.',
'Expected server HTML to contain a matching text node for "%s" in <%s>.%s',
text,
parentNode.nodeName.toLowerCase(),
getStack(),
);
}
}
Expand Down
Loading

0 comments on commit 4e42d23

Please sign in to comment.