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

Fix hot reloading identical event handler closures #3270

Merged

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Dec 2, 2024

Hot reloading diffing counted any event handlers with identical tokens as identical, but that is not true if they are used on different events. The event function influences the type of the event handler closure, so we cannot hot reload moving an event handler closure from one event to another

Fixes #3268

@ealmloff ealmloff added bug Something isn't working hot-reload Related to the hot reload crate labels Dec 2, 2024
@johnny-smitherson
Copy link

yes this fixed the problem

 cargo install --git https://github.com/ealmloff/dioxus dioxus-cli --rev 1abfff3145eb670c009382997af3f8c09a88a120

thanks

@jkelleyrtp jkelleyrtp merged commit a780658 into DioxusLabs:main Dec 2, 2024
16 of 17 checks passed
@ealmloff ealmloff deleted the fix-hot-reloading-event-listeners branch December 2, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hot-reload Related to the hot reload crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hotreload panics browser after adding/removing event listeners
3 participants