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 state mismatch during component update #631

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Jan 29, 2022

Something worth thinking about is whether this error had actually existed due to the previous state hook not being deleted from memory. Just want to ensure there are no memory leaks occurring.

@Archmonger Archmonger marked this pull request as ready for review January 29, 2022 03:48
VERSION Outdated Show resolved Hide resolved
@Archmonger
Copy link
Contributor Author

Archmonger commented Jan 29, 2022

Let me know if you think this is safe.

I'm slightly worried this exception may have occurred due to an incomplete wipe of component hooks on key change. If so, then this would be a memory leak.

But I don't know enough about the layout call stack to say anything with certainty.

@rmorshea
Copy link
Collaborator

I think it's ok. I'm pretty certain I introduced this because I didn't really understand how keys worked very well.

@rmorshea
Copy link
Collaborator

rmorshea commented Jan 29, 2022

We unmount on the same condition here so we should be avoiding the memory leak.

@rmorshea
Copy link
Collaborator

I'll have time to release this tomorrow.

@rmorshea rmorshea merged commit 37a5be2 into reactive-python:main Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State mismatch during component update
2 participants