Subscribe on changes!

watch callback is run twice when calling `createApp` in the callback

avatar
Sep 7th 2022

Vue version

3.2.38

Link to minimal reproduction

SFC Playground

Steps to reproduce

  1. Open the demo@vue3.2.38
  2. After clicking it, two nodes will appear

CleanShot 2022-09-07 at 15 26 02

What is expected?

  1. open the demo@vue3.2.37
  2. After clicking it, one node will appear

CleanShot 2022-09-07 at 15 24 55

What is actually happening?

Two nodes will appear!!!

System Info

No response

Any additional comments?

No response

avatar
Sep 7th 2022

@LinusBorg Both Vant's Toast component and Arco-Design's Message component are implemented using Vue.render. Here is the core code. demo

Duplicate of #6609

avatar
Sep 7th 2022

I'll keep this issue open and keep #6609 closed because this issue here as a minimal reproduction out of the gate and focusses on the actual issue.

avatar
Sep 28th 2022

@yyx990803 I can still reproduce the issue on a deployed app (Vue 3.2.39 in production mode) but it's very difficult to create a reproduction as it seems to be random. I guess there is a timing or race condition at play...

Here is a screenshot of requests failing becase watchers are being executed while unmounting components after changing route: image

I will continue to investigate and try to narrow the issue down.