Closed nine-fox closed 2 months ago
I can't find any mention of the stop
function in the documentation, so I'm unclear whether it is intended to be used in this way. As far as I'm aware, using effectScope
is the only documented way to dispose of a computed
manually.
effect
property of ComputedRefImpl
, but it seems to have been kept for backwards compatibility:That backwards compatibility doesn't include the effect.stop()
method, which is needed by the stop
function.
Update: After reading the PR description for #10397 a bit more carefully, it looks like a computed
can no longer be stopped, even using effectScope
. The documentation for effectScope
may need updating, as it currently mentions computed
.
duplicate of https://github.com/vuejs/core/issues/11886
Vue version
3.5.6
Link to minimal reproduction
https://play.vuejs.org/#eNp9UslOwzAQ/ZWRLxS1SotYDpBWLOIAB0DA0RIK7qQEEtuyx6VSlH9n7NAFCfWWeZveTNyKK2uzZUBxLnKvXGUJPFKwM6mrxhpH0ILDcgSejB2BMo0NhHPooHSmgQO2HkgttTLaE9NBEzqYRs9gcnixpQoG1+7B4BCmM2ilBhZScHrtzJZFHRCGcDSZsLnrE8qgFVVGpxJvWJaoiCOSP0KDIuo6qfNxvwO354GwsXVByBNA/nE0a9tNw67Lx4wk5j0Qcfilqiv1NZXiVzMcSjG70yof94IUugkq9kb8KcoxcYZ+3onLxzsVxUiQ51uV1SL79EbzH0kLxj6NrWp0jzYewUtx3q8euaKuzfd9wsgFHK1x9YHq6x/8068iJsWTQ49uiVJsOCrcAqmnb18ecMXfG7Ix81Czeg/5jN7UIXbsZddBz7n2ji61vUvvqtKLV3+7ItR+vVQsGpVd0kvBb+tmz+rbusfZSfLxG+Arvi3RxUw+4HF2mp2J7gdI4vgA
Steps to reproduce
Click stop_effect button, then error occured: TypeError: runner.effect.stop is not a function.
Please note, the error is not emitted under vue version 3.4.38.
What is expected?
No errors.
The same behavior between these 2 versions.
What is actually happening?
TypeError: runner.effect.stop is not a function.
System Info
Any additional comments?
No response