watchEffect performs bad with emits #13338
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
Vue version
3.5.13
Link to minimal reproduction
https://codesandbox.io/p/devbox/vue-test-54xk9s
Steps to reproduce
run the project and open devtool
What is expected?
The number on page is 1. 1 second later it turns to 2 and doesn't change.
An "setup" and an "effect" are printed
What is actually happening?
The number on page is 1. 1 second later it turns to 3, and every 1 second later it grows 2
An "setup" and an "effect", and every 1 second later an "effect" is printed
System Info
Any additional comments?
it seems like emits were collected as watchEffect's dependence
The text was updated successfully, but these errors were encountered: