Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Apr 4, 2022

Copy paste into another file and add a few more cases to document the current behavior.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 4, 2022
return (
<div>
<span suppressHydrationWarning={true}>
{isClient ? null : 'Server'}
Copy link
Collaborator Author

@gaearon gaearon Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, {isClient ? null : 'Server'} throws. But {isClient ? 'Client' : null} works fine. {isClient ? 'Client' : 'Server'} also works fine. Should we make it consistent?

@gaearon gaearon requested review from acdlite and sebmarkbage April 4, 2022 22:40
@sizebot
Copy link

sizebot commented Apr 4, 2022

Comparing: fc47cb1...ac628a3

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 131.39 kB 131.39 kB = 41.99 kB 41.99 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.44 kB 136.44 kB = 43.43 kB 43.43 kB
facebook-www/ReactDOM-prod.classic.js = 432.94 kB 432.94 kB = 79.59 kB 79.59 kB
facebook-www/ReactDOM-prod.modern.js = 417.94 kB 417.94 kB = 77.23 kB 77.23 kB
facebook-www/ReactDOMForked-prod.classic.js = 432.94 kB 432.94 kB = 79.60 kB 79.60 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against ac628a3

@gaearon
Copy link
Collaborator Author

gaearon commented Apr 4, 2022

it's just a test

@gaearon gaearon merged commit 5f7f528 into facebook:main Apr 4, 2022
@gaearon gaearon deleted the suppress-tests branch April 4, 2022 23:04
rickhanlonii pushed a commit that referenced this pull request Apr 13, 2022
* More tests for suppressHydrationWarning

* Move suppressHydration tests to new file

* Extract more tests

* Test name

* Test legacy behavior too
rickhanlonii pushed a commit that referenced this pull request Apr 14, 2022
* More tests for suppressHydrationWarning

* Move suppressHydration tests to new file

* Extract more tests

* Test name

* Test legacy behavior too
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
* More tests for suppressHydrationWarning

* Move suppressHydration tests to new file

* Extract more tests

* Test name

* Test legacy behavior too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants