-
Notifications
You must be signed in to change notification settings - Fork 49.1k
Closed
Labels
Component: DOMResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityType: EnhancementType: Needs Investigation
Description
Currently when hydrating server-rendered markup we ignore changes the user makes before hydration. We also don't reset their changes once hydration finishes. The motivation there was likely to avoid losing user input. See this test:
The problem with that is that it assumes the value will continue to be changed after hydration completes (e.g., a user keeps typing). If they don't, then the DOM and React will be out of sync.
We should try to detect if there have been any changes made to an input when hydrating, and if so dispatch a change event so that the component is notified of the new value.
See #12939 for some more discussion.
oliviertassinari, joliss and OliverJAsh
Metadata
Metadata
Assignees
Labels
Component: DOMResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityType: EnhancementType: Needs Investigation