Subscribe on changes!

vue 3.2.38 latest version watcher bug

avatar
Sep 6th 2022

Vue version

3.2.38

Link to minimal reproduction

https://sfc.vuejs.org/#eNqlUsFu00AQ/ZXRXuxIiVdtbiGpqBA3LiA4sRyMM25d7N1ld52oiiyBVAQVXLmgHlqpwAX+IPwNScupv8CsHUehqAipUSx5Zt88z3v7ZmxX62hSIhuwoU1Mph1YdKXeETIrtDIOZmAw7cI0dsl+V8knehw7HEMFqVEFBDQbrLH3VKFX/Yj7wlMHd4Rcz4VhZ7QDMyEB4hyNC7e3O3RedYRMS5m4TEnYQ0f/sLMJ6/cJAcD58vv54vzo18mryy+vF/OPizefJ7F0F5+OAB6r2Low+Pnj9OLk/fL46+XZh8Xb0+W3s5riav6u37+aHwdEVAk55I1cEkqFw0LntB9VAEOvHug3rPXcNfiyROt6eWbdSLBmPcF4A+YePeRrBtZljRu9ItbRgVWSvK2ViNWBFWzQaPM9csjXgu07p+2Ac5sm3rYDGymzx+ktMqV0WYER2qL33KipRUPEgnU3ODg1J2h6BuUYDZp/cV6D/sXracmiiqS0l3jLfOToAIvMPWqsfEBOwgjGmGYS71Pfhk+DTZuDZ3RLiZIEq5s+FiP/oTDw93dznLa22jjVC4XtdBdieygTCCVOH656HWhnr60W/rmLDww9/5OYXfsCYjhEy6Vabz5YpSmTunQw6RVqjDkFqT0XDG7KUvUbIThQTg==

Steps to reproduce

Sorry, I'm a Chinese. I speak Chinese later 应该是 解决 #2291 bug的时候,造成的问题; 务必引用vant组件,调用Toast () 可以复现 //子组件

//父组件

What is expected?

修复watch执行两遍的问题

What is actually happening?

watch执行两遍

System Info

No response

Any additional comments?

No response

avatar
Sep 6th 2022

U provided the minimal reproduction! I try it and Watcher is called once

avatar
Sep 6th 2022

我也发现这个问题了,过来github找解决办法。。。3.2.26已经存在这个问题

avatar
Sep 6th 2022

Same issue, pre watcher triggered 2 times

avatar
Sep 6th 2022

When I run this SFC playground reproduction and enter "a" into the input, I get 2 alerts - one from the watch, one from the onUpdated() hook.

Both are expected. I don't see multiple watcher calls, I don't see anything else supsicious. What should I be looking for?

Those of you who say they can reproduce this: what browser are you using?

Edit: translating the chinese text tells me I have to use vant to reproduce, not the example in the playground?

Sounds like you need to a) open an issue with vant or b) find a way to reproduce the problem without vant. I don't see what we should be doing here.

avatar
Sep 7th 2022

@LinusBorg like this, example

avatar
Sep 7th 2022

@LinusBorg like this, example

This may not be Vue's problem,Remove line 10 and try again

avatar
Sep 7th 2022

We don't have the capacity to debug vant, or arco-design.

Please open an issue with them.

Maybe they can verify it and create a reproduction that does not involve their big third party library, so we can actually evaluate the problem with Vue alone.

avatar
Sep 7th 2022

Seems #6614 successfully demonstrates the issue with Vue alone. Closing in favor of that issue