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 wrong order of mount and unmount when streamed #272

Merged
merged 1 commit into from Dec 17, 2018

Conversation

cornerman
Copy link
Member

@cornerman cornerman commented Dec 11, 2018

The logic of streamed unmount hooks has a flaw. It uses PostPatchHooks which are not guaranteed to be run before all mount hooks of the next patch-iteration. This PR now uses UpdateHook for mirroring streamed unmount hooks. This will always be done before any mount hook which is called from an insert or post patch hook. And importantly it also needs to be done after the PrePatchHooks because of thunks and because prepatch can be called more often than update by snabbdom.

Based on #273

@cornerman
Copy link
Member Author

I have updated this PR. It works as expected now :)

@cornerman cornerman merged commit e27dc4f into outwatch:master Dec 17, 2018
@cornerman cornerman deleted the order-mount-unmount branch December 17, 2018 10:43
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.

None yet

2 participants