Skip to content

[Test] Outer boundary should not report errors from an inner boundary#24618

Merged
gnoff merged 2 commits into
react:mainfrom
gnoff:hydration-error-nested-boundaries
May 25, 2022
Merged

[Test] Outer boundary should not report errors from an inner boundary#24618
gnoff merged 2 commits into
react:mainfrom
gnoff:hydration-error-nested-boundaries

Conversation

@gnoff

@gnoff gnoff commented May 25, 2022

Copy link
Copy Markdown
Contributor

@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.

Comment thread packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js Outdated
@gnoff

gnoff commented May 25, 2022

Copy link
Copy Markdown
Contributor Author

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

@acdlite acdlite left a comment

Copy link
Copy Markdown
Collaborator

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

sizebot commented May 25, 2022

Copy link
Copy Markdown

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
Copy Markdown
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 react:main May 25, 2022
@gnoff gnoff deleted the hydration-error-nested-boundaries branch May 25, 2022 21:10
@gnoff

gnoff commented May 26, 2022

Copy link
Copy Markdown
Contributor Author

@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.

5 participants