Skip to content

bug: scoped: true / SSR components incorrectly resolve <slot /> during first render #6080

Closed

Description

@johnjenkins

Prerequisites

Stencil Version

latest

Current Behavior

When hydrating scoped: true via SSR, Stencil's vdom-render incorrectly re-renders / does not resolve slot nodes.
This results in incorrect ordering as nodes are remove / re-inserted

image

Expected Behavior

Nodes in correct order. No extra re-renders

System Info

No response

Steps to Reproduce

Open https://stackblitz.com/edit/stencil-start-ydmeww :

npm run build && npm run express

In the preview window, click on 'non-shadow-multi-slots'.

Notice nodes are in the incorrect order.

Code Reproduction URL

https://stackblitz.com/edit/stencil-start-ydmeww

Additional Information

when re-writing client-hydrate I didn't take into account some new resolving heuristics that were more-recently added to vdom-render.
*edit ... this pattern was completely broken in previous Stencil versions so not a regression

Fix in-bound

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions