Internal watcher retained after hook:destroyed?
nerdcave opened this issue · comments
Jay Elaraj commented
Should this watcher be set to null
upon hook:destroyed
?
I'm working on an app where a destroy()
call causes "shared" computeds to stop updating. I believe Vue is removing its subscriptions under the hood while this watcher
in the composition-api plugin is retained.
Code in following comment...
Jay Elaraj commented
I was able to create a minimal example that reproduces the bug: https://github.com/nerdcave/composition-bug
Clone the repo, run yarn install
then yarn test:unit
. The last expect
in the test fails.
Jay Elaraj commented
Not a bug, it's a scope issue. Just discovered new EffectScope(true)
, which fixes it.