bug: ssr <slot />
s can be incorrectly resolved during client-side hydration
#6130
Closed
3 tasks done
Labels
Prerequisites
Stencil Version
latest
Current Behavior
if sibling
<slot />
elements change from server to client render, vdom resolution can fail.example:
After client hydrate:
^ the default slot is replaced with an incorrect duplicate of the first slot
Expected Behavior
Slots from server render should be correctly resolved during client-side hydration. In this case, the default slot should not be removed.
System Info
Steps to Reproduce
https://stackblitz.com/edit/stencil-start-1wfms9fy?file=src%2Fcomponents%2Fincorrect-slot-hydrate.tsx
Click on 'incorrect-slot-hydrate'
There should be slotted text 'Default slot content' but the default slot has been removed / given a 'name' so the text does not render.
Code Reproduction URL
https://stackblitz.com/edit/stencil-start-1wfms9fy?file=src%2Fcomponents%2Fincorrect-slot-hydrate.tsx
Additional Information
The text was updated successfully, but these errors were encountered: