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

fix: hydration error on promise example #203

Merged
merged 5 commits into from
Dec 3, 2023

Conversation

himself65
Copy link
Contributor

This will fix the hydration issue. Not sure if this is correct

Fixes: #202

Copy link

vercel bot commented Dec 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Dec 3, 2023 5:27am

Copy link

codesandbox-ci bot commented Dec 3, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1867d1e:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration

return (
<ul>
<li>count: {count}</li>
<li>delayedMessage: {message}</li>
Copy link
Owner

Choose a reason for hiding this comment

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

Hm, ARAIU, React should internally use a promise which is directly put in JSX.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why...🤔 maybe ask React member to get some help?

@dai-shi
Copy link
Owner

dai-shi commented Dec 3, 2023

wow, it works even with RSC -> HTML order.

image

@dai-shi
Copy link
Owner

dai-shi commented Dec 3, 2023

This will fix the hydration issue. Not sure if this is correct

If using use fixes the issue, I think it's React's issue.

@himself65
Copy link
Contributor Author

This will fix the hydration issue. Not sure if this is correct

If using use fixes the issue, I think it's React's issue.

Now I get why React 18.3.0 was delayed for one year :/

@himself65
Copy link
Contributor Author

Let me try if next.js could do the promise as props

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
@dai-shi dai-shi merged commit 8691b27 into dai-shi:main Dec 3, 2023
9 checks passed
@himself65 himself65 deleted the himself65/hydration-error branch December 3, 2023 05:52
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.

Hydration error with examples/03_promise
2 participants