-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
Bug: form data is lost upon hydration #26974
Comments
Yeah the timeout is to simulate delayed hydration e.g. due to slow JS. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Related:
React version: 18.2.0
Steps To Reproduce
Link to code example: https://github.com/OliverJAsh/react-controlled-form-hydration-issue
Given this component which is used during SSR and then hydrated on the client-side:
The current behavior
After hydration, the input's value is set back to the initial state. The text entered by the user prior to hydration is lost.
Screen.Recording.2023-06-19.at.12.33.28.mov
The expected behavior
The text entered by the user prior to hydration should be preserved.
The text was updated successfully, but these errors were encountered: