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

SSR and dependencies sections cause hydration errors. #4083

Open
4 tasks done
KeiranHines opened this issue Feb 8, 2024 · 1 comment
Open
4 tasks done

SSR and dependencies sections cause hydration errors. #4083

KeiranHines opened this issue Feb 8, 2024 · 1 comment

Comments

@KeiranHines
Copy link

Prerequisites

What theme are you using?

mui

Version

5.17.0

Current Behavior

When loading this example form using remix.run@2.60 and cloudflare pages for server side rendering, the default value of "yes" in "a" causes a Prop 'aria-controls' did not match. Server: ":R2alajar9lacn96acp:" Client: ":R4lal6ir9lacn96acp:" div error as Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server.

This causes the frontend to render incorrectly at plain HTML.

Expected Behavior

The UI renders correctly and Hydration is not broken.
Ideally the dependency is evaluated before first render causing the initial state to be with the dependency visible.

Steps To Reproduce

  1. Startup a new remix, run project with mui and rjsf dependencies
  2. use the linked playground schema to create a new form.
  3. Form is broken.

codepen of github repo can be provided if required.

Environment

- OS: Windows 11
- Node: 18.17.1
- npm: 8.13.2

Anything else?

I have not tested other SSR engines or other remix engines to validate the behavior on other runtimes.

@KeiranHines KeiranHines added bug needs triage Initial label given, to be assigned correct labels and assigned labels Feb 8, 2024
@heath-freenome
Copy link
Member

@KeiranHines I don't know how you might be able to fix this. Since SSR doesn't render more that once, it is possible that component updates are happening on the client that doesn't happen on the server. We would welcome any fixes you might come up with to support SSR. Unfortunately, we do not have the bandwidth to debug this for you. Sorry.

@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants