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

Only poll suspended futures, lazy memos #2005

Merged
merged 8 commits into from
Mar 8, 2024

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Mar 6, 2024

This PR fixes suspense polling futures that are unrelated to suspense. This will fix some hydration errors including #1804.

Currently during suspense, all futures that have been spawned will be polled until suspense is finished. This causes hydration issues if a future finishes on the server but not the client and renders different content.

Fixes #2003
Fixes #1935

@ealmloff ealmloff added bug Something isn't working core relating to the core implementation of the virtualdom fullstack related to the fullstack crate labels Mar 6, 2024
@jkelleyrtp jkelleyrtp changed the title Only poll suspended futures Only poll suspended futures, lazy memos Mar 6, 2024
@ealmloff ealmloff marked this pull request as ready for review March 8, 2024 02:50
@jkelleyrtp
Copy link
Member

Looks great :) Clean diff, straightforward code. I like that we collapsed the DirtyScopes into VirtualDom. Fantastic work, thanks!

@jkelleyrtp jkelleyrtp merged commit 295c29d into DioxusLabs:main Mar 8, 2024
9 checks passed
@ealmloff ealmloff deleted the fix-suspense branch March 8, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core relating to the core implementation of the virtualdom fullstack related to the fullstack crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suspend should take an explicit future Memos can give out of date values
3 participants