Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add a failing test rendering null on client with SSR #28298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Feb 10, 2024

Summary

This doesn't include a fix; it just adds a failing test.
The test shows React renders duplicate content when hydrateRoot renders null and then updates the actual content.
This is the hydration mismatch error, a common mistake in a loading pattern, so I think React should warn it or fix the duplicate content.
Do you have any idea which way I should take? I'll work on fixing this in the way we agree.

How did you test this change?

yarn test packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js

@react-sizebot
Copy link

react-sizebot commented Feb 10, 2024

Comparing: e1d20fc...ed6af9f

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 = 176.24 kB 176.24 kB = 54.88 kB 54.88 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.34 kB 178.34 kB = 55.52 kB 55.53 kB
facebook-www/ReactDOM-prod.classic.js = 571.94 kB 571.94 kB = 100.56 kB 100.56 kB
facebook-www/ReactDOM-prod.modern.js = 555.70 kB 555.70 kB = 97.62 kB 97.62 kB
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Generated by 🚫 dangerJS against ed6af9f

Copy link

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants