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 incorrect unmount behaviour with usevalue logic #56

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

Bloomca
Copy link
Owner

@Bloomca Bloomca commented Jun 9, 2024

Description

I accidentally discovered that useValue uses an incorrect logic to replace childComponents array, which led to some onUnmount callbacks being called multiple times (and others potentially never).

Another thing here is that we reverse the onUnmount calls, this way we unmount children first, and parent after that, which should be more logical. I don't use it anywhere, and in general it is common not to guarantee the execution order for such things, but I think it makes more sense. It might change in the future if I add promises support to components.

@Bloomca Bloomca merged commit d5fbb11 into main Jun 9, 2024
1 check passed
@Bloomca Bloomca deleted the fix-incorrect-unmount-usevalue-logic branch June 9, 2024 17:14
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.

1 participant