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

Make hydration more resilient #1732

Merged
merged 8 commits into from
Jan 4, 2024

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Dec 19, 2023

This PR changes the process of hydration to make it more resilient to changes the browser might make to the structure of nodes. The old version of hydration used the structure of the dom to hydrate each node. The new version uses a set of predefined ids to hydrate nodes instead. That means that the page should still hydrate correctly even if the nodes are moved around before hydration.

Closes #1717
Closes DioxusLabs/docsite#91
Closes DioxusLabs/docsite#139

TODO:

  • Fix suspense
  • Test new hydration on the docsite

@ealmloff ealmloff added enhancement New feature or request fullstack related to the fullstack crate labels Dec 19, 2023
@ealmloff ealmloff marked this pull request as ready for review December 27, 2023 16:17
@ealmloff ealmloff force-pushed the resilient-hydration branch from 407f3cb to b7aea96 Compare December 27, 2023 16:25
@ealmloff ealmloff marked this pull request as draft December 27, 2023 16:39
@ealmloff ealmloff marked this pull request as ready for review December 27, 2023 16:54
@ealmloff ealmloff mentioned this pull request Dec 29, 2023
@jkelleyrtp jkelleyrtp merged commit bcc2da4 into DioxusLabs:master Jan 4, 2024
0 of 2 checks passed
@ealmloff ealmloff deleted the resilient-hydration branch January 4, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fullstack related to the fullstack crate
Projects
None yet
2 participants