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

Add fix for potential hydration mismatch errors #4675

Merged
merged 9 commits into from
Nov 23, 2024
Merged

Add fix for potential hydration mismatch errors #4675

merged 9 commits into from
Nov 23, 2024

Conversation

cmdcolin
Copy link
Collaborator

This re-wires aborting through the system which fixes #4674

I'm not particularly happy that aborting is required to fix this error, i think aborting should be an optional add on, but it does sort of makes sense that aborting fixes it because it prevents 'old' results from being hydrated with 'new props' which may be possible, which is otherwise actually very hard to avoid with the way that our hydration works (because both the hydrateRoot and the hydrateRoot.unmount have to be asynchronously done, and adding a check would require serializing all the props and checking that they are the same...or somthing like this, sort of guessing)

So, anyways, aborting allows the old results to be shot down before trying to appear in the UI

fixes #4674

@cmdcolin cmdcolin force-pushed the aborting_fix branch 4 times, most recently from b760d9b to a7448b2 Compare November 23, 2024 00:09
@cmdcolin cmdcolin force-pushed the aborting_fix branch 2 times, most recently from 4542b49 to c65a129 Compare November 23, 2024 00:22
@cmdcolin cmdcolin merged commit 7e2f266 into main Nov 23, 2024
@cmdcolin cmdcolin deleted the aborting_fix branch November 23, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Hydration mismatch' errors after stop token implementation
1 participant