Closed nerdcave closed 2 years ago
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.
Not a bug, it's a scope issue. Just discovered new EffectScope(true)
, which fixes it.
Should this watcher be set to
null
uponhook: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 thiswatcher
in the composition-api plugin is retained.Code in following comment...