Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-show causes async component child to be recreated in SSR mode #12362

Closed
aKzenT opened this issue Nov 11, 2024 · 0 comments · Fixed by #12363
Closed

v-show causes async component child to be recreated in SSR mode #12362

aKzenT opened this issue Nov 11, 2024 · 0 comments · Fixed by #12363
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

Comments

@aKzenT
Copy link

aKzenT commented Nov 11, 2024

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.

@edison1105 edison1105 added 🐞 bug Something isn't working scope: ssr labels Nov 12, 2024
@edison1105 edison1105 added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants