Skip to content

fix(react): ssr hydration with children #464

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

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

christian-bromann
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally for affected output targets
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

It seems I made a mistake when rebasing my previous nextjs dev branch and missed what I implemented in #447.

What is the new behavior?

Reapply what's in that PR + adding additional tests.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@christian-bromann christian-bromann enabled auto-merge (squash) August 28, 2024 14:50
serializedChildren = ReactDOMServer.renderToString(awaitedChildren);
} catch (err: unknown) {
const error = err instanceof Error ? err : new Error('Unknown error');
console.log(
Copy link
Contributor

Choose a reason for hiding this comment

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

~ No action needed. Is a serialization failure actionable for the developer? If so, thoughts on elevating this to a warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion, I can tweak this with my next PR.

@christian-bromann christian-bromann merged commit 48da093 into main Aug 28, 2024
3 checks passed
@christian-bromann christian-bromann deleted the cb/nextjs-with-children branch August 28, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants