Skip to content

fix(watch): component should runCleanup() on unmount #298

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

Merged
merged 2 commits into from
Apr 24, 2020

Conversation

LinusBorg
Copy link
Member

@LinusBorg LinusBorg commented Mar 30, 2020

  • watchEffect now properly calls runCleanup() when the component unmounts.
  • I applied the same change for "normal" watchers as I found that the bug applied to those as well.

Would like a second pair of eyes though, to verify.

close #293

@LinusBorg LinusBorg changed the title fix(watch): component should runCleaup() on unmount fix(watch): component should runCleanup() on unmount Mar 30, 2020
@LinusBorg LinusBorg force-pushed the fix-293-watch_cleanup-on-unmount branch from 434cd8c to 8297872 Compare March 30, 2020 17:49
@LinusBorg LinusBorg self-assigned this Apr 24, 2020
@LinusBorg LinusBorg merged commit d1715e4 into master Apr 24, 2020
@LinusBorg LinusBorg deleted the fix-293-watch_cleanup-on-unmount branch April 24, 2020 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WatchEffect's onCleanup is not firing when component is unmounted
2 participants