v-show causes async component child to be recreated in SSR mode #12362
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
🐞 bug
Something isn't working
scope: ssr
Vue version
3.5.12
Link to minimal reproduction
https://play.vuejs.org/#__SSR__eNqtVMFu00AQ/ZWROTQRwU4pXIobqVQ9gERBTSUulpBrj50t611rd50ERf53Zncd100c4EDVKMm857fz3s5kF1zXdbhuMLgMYoNVzVODi0QA/S03zGQrWC7v4bExRgqg/1TkIIvCM+IHWZZ8z3eVvQa8yrFIG24GoCN8V2ldozoo/wVy8M2K8XwRR/595PloXGCsHkcHZuOo9/ICo686U6w2oNE0NfBUlFdJYHQSEMqqWioDOyCzTOC1/iWyG0lFgcJAC4WSFZxRvGcferJrv0NCb8ZegGUkIpNCG/CtwNWo7GQyhasFeLUJSXi205hOScVrdJ7/VaSjP6vEkfdNLoMZ+SXVgpXhk5aCZmVnU0uCjPQYR/W1NoxOTYJLcIjFUs7l5rOrGdXgbF/PVpj9HKk/6a2tJcE3hRrVGpOgx0yqSjQevl3e4ZY+92Al84YT+w/gPWrJG9ujp31sRE5tD3iu208uDibKB327NSj03pRt1DJbx08CSslGecr6c7sX4Tv3XCJaSnEQ8si+xQVDntOYDedUc2kg6od0QHkxpiTeT9KYdM7Wi7umeqSBkAUYVqEGs0oNVLKhSd2kGjKKAHNysSu5fEz5jUXaNo7ssye3YrAPfkOGWyHFFyuC+eEqDDiDw3oWrYX9Hhrtyb1ON7Zd0INHw3XKG7sxx7XXcE4i7fFMP+/NicRg/Uav5IbsaUOI2/hTF/MfQpqBwuI4Kb/OrgPyR5RJkXKN1s/JZOiQB7pj2ewXvas7zCr1ednJJiULtDM4n8/nVngkrf2NUFZ964f9Jop6olcUdffgD5tBppDec2CCBs4uJNDvSY2Wi1sn5l0Oh8F7nU8tic7/sUZl95HOvwjfh+dvg/Y3Lrsw6g==
Steps to reproduce
Switch SSR toggle on and off in playground
What is expected?
The counter should show "1" in both cases as there is only a single Child component and changing the v-show attribute (see Toggle.vue) should not cause component to be recreated. At the very least, vue should behave the same regardless of whether the app is using SSR or not.
What is actually happening?
If SSR toggle is on, you will see the counter showing "2", indicating that the component was recreated. If SSR toggle is off, the component is not created again after the v-show change.
System Info
No response
Any additional comments?
Making any of the async components sync, removing one of the nested Wrapper components or changing v-show to v-if will make the bug disappear.
The text was updated successfully, but these errors were encountered: