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

Hydration mismatch using react-renderer and shadcn/ui form, dropdown-menu etc. #240

Open
bostjanpisler opened this issue Nov 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@bostjanpisler
Copy link

What version of HonoX are you using?

0.1.27

What steps can reproduce the bug?

  1. Create hono x-basic
  2. Replace hono jsx render with hono react-renderer
  3. Install shadcn/ui form component

What is the expected behavior?

Server and client rendered components match and no warning is logged.

What do you see instead?

"Warning: Prop htmlFor did not match. Server: ":Riq:-form-item" Client: ":R9:-form-item" Error Component Stack"

Additional information

React.useId() generates different IDs during server-side rendering and client-side hydration. This is happening in FormItem component where we're using useId() to generate unique identifiers. The form component was not modified after it was installed.

@bostjanpisler bostjanpisler added the bug Something isn't working label Nov 30, 2024
@ElasticBottle
Copy link

@bostjanpisler did you end up finding a workaround for this?

@bostjanpisler
Copy link
Author

No, was unable to find a solution so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants