Skip to content

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

3 participants