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

useId hook gives different ids on server and client, leading to hydration error #1100

Closed
RndUsername opened this issue Dec 28, 2024 · 3 comments · Fixed by #1109
Closed

useId hook gives different ids on server and client, leading to hydration error #1100

RndUsername opened this issue Dec 28, 2024 · 3 comments · Fixed by #1109

Comments

@RndUsername
Copy link

As you can see in this StackBlitz, the console throws a hydration error in the newest version of waku, pointing to the id of the button. I have this problem since #1088 but I'm not sure if they are related.

@dai-shi
Copy link
Owner

dai-shi commented Dec 28, 2024

Thanks for reporting. We should add a test to avoid such a regression.
Can you dig into it? Identifying which PR caused the regression would be helpful.
If you go to a PR, you will se "codesandbox-ci" message. Then, click "here" link and find "Local Install Instructions". It should work on StackBlitz too.

@RndUsername
Copy link
Author

It seems like #1087 is the first one to have this error. I tested the following PRs (❌ are the ones having the error):

#1090
#1088
#1087

#1085
#1083
#1078

@dai-shi
Copy link
Owner

dai-shi commented Dec 30, 2024

#1087 doesn't change the code. I think it's #1088 which is merged before #1087.
Thanks for testing!

dai-shi added a commit that referenced this issue Dec 31, 2024
close #1100 

- [x] add failing test
- [x] fix it
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 a pull request may close this issue.

2 participants