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

Assume the virtual dom is not rendering while not diffing components #3406

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

ealmloff
Copy link
Member

We currently assume everything except tasks, events, and effects happens while the vdom is rendering. This causes issues with external callbacks in the dom like a scroll handler attached to the window. The rendering flag is used both for warnings and to determine if signals should subscribe to components

This PR fixes those issues by only setting the rendering boolean while rendering and assuming everything else happens when the vdom is not rendering. It also adds a playwright test to check this behavior

Closes #3399

@ealmloff ealmloff added bug Something isn't working core relating to the core implementation of the virtualdom labels Dec 19, 2024
@ealmloff ealmloff changed the title Invert when rendering is set Assume the virtual dom is not rendering while not diffing components Dec 19, 2024
@ealmloff ealmloff marked this pull request as draft December 19, 2024 18:30
@ealmloff ealmloff marked this pull request as ready for review December 20, 2024 14:21
@jkelleyrtp jkelleyrtp merged commit 01ebccc into DioxusLabs:main Dec 20, 2024
29 of 30 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing a value to a signal inside a Closure triggers infinite rerender warning
2 participants