First-Class Stencil Component Interop for Qwik: SSR Bridge and Typed Wrapper Generation #347
Replies: 2 comments
-
|
@wmertens, @PatrickJS, @maiieul, (anyone else) - any word on this? |
Beta Was this translation helpful? Give feedback.
-
|
Hey Dmitry! This is really impressive. I cloned the demo POC and played with it, especially getting SSR to work!! My understanding is that stencil components still hydrate and execute once on the server, and again on the client. I see a lot of value for those using existing Stencil design systems adopting Qwik or vice versa. Is there a way we could make it more general beyond stencil? For example, a package that works with the Custom Elements Manifest, where you could also use Lit, Fast, Shoelace, etc. and Stencil is one of these as an adapter. I would say for now this is not possible to maintain in core given the advanced scope. I would publish this as a community package for now, and depending on how it is maintained it could be upgraded to similar packages like Another thing is the performance story. At some point, the hydration cost of many Stencil components would start to negate Qwik's resumability benefits. Have you looked into this / how it performs? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
Introduce official Qwik support for rendering Stencil custom elements with SSR plus an accompanying generator that emits typed Qwik wrappers from Stencil metadata.
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
Any other context or information you want to share:
createStencilSSRComponentimplementation and itsStencilSSRPropsevent and slot contract.Proposed Solution / Feature
What do you propose?
1) Runtime Layer: first-class Stencil SSR bridge API
Add an official runtime API in Qwik for SSR-capable Stencil interop, based on a component factory pattern that accepts:
The runtime should include:
renderToString2) Tooling Layer: official wrapper generator
Add official tooling to generate typed wrappers from built Stencil output:
Code examples
Example: app-level usage with generated wrappers
Example: generated wrapper event mapping shape
Example: fallback behavior when metadata is incomplete
Non-goals (initial scope)
Rollout / Adoption Plan
Links / References
Beta Was this translation helpful? Give feedback.
All reactions