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] Outer boundary should not report errors from an inner boundary #24618

Merged
merged 2 commits into from May 25, 2022

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented May 25, 2022

@jplhomer reported an issue with hydration error messages in #24578

The root issue is if you have a pair of nested Suspense boundaries, if the inner one has hydration errors caused by something suspended but the outer one is not suspended, it will report the inner boundaries errors as recoverable.

The changes in #24532 move the recoverable error logic so that it only fires for the hydrating boundary which resolves this bug and causes the test to pass.

@gnoff
Copy link
Collaborator Author

gnoff commented May 25, 2022

"this pr is just a test + deleting a bunch of other tests"... 😁

Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Neat!

…re not retained by an unsuspended outer boundary
@gnoff gnoff force-pushed the hydration-error-nested-boundaries branch from c26eef1 to b1fbb14 Compare May 25, 2022 19:44
@sizebot
Copy link

sizebot commented May 25, 2022

Comparing: b2763d3...cf2accf

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.28 kB 131.28 kB = 42.13 kB 42.13 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.54 kB 136.54 kB = 43.68 kB 43.68 kB
facebook-www/ReactDOM-prod.classic.js = 439.35 kB 439.35 kB = 80.29 kB 80.29 kB
facebook-www/ReactDOM-prod.modern.js = 424.64 kB 424.64 kB = 78.13 kB 78.13 kB
facebook-www/ReactDOMForked-prod.classic.js = 439.35 kB 439.35 kB = 80.29 kB 80.29 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against cf2accf

@jplhomer
Copy link
Contributor

omg thank you @gnoff for the test and @acdlite for the "code shuffle" 😆

I confirmed that our issue is resolved when using react@https://react-builds.vercel.app/api/prs/24532/packages/react 🎉

@gnoff gnoff merged commit 05c34de into facebook:main May 25, 2022
@gnoff gnoff deleted the hydration-error-nested-boundaries branch May 25, 2022 21:10
@gnoff
Copy link
Collaborator Author

gnoff commented May 26, 2022

@jplhomer thanks for reporting that issue! It was surprisingly generic (affected flight and fizz) and would have been easy for folks to hit in many different setups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants