3 ms·
> …which would then mean it's not a web component and just typical SSR. SSR doesn't mean that you can't use web component frameworks, just that the framework m
by CharlesW 3y ago
> …which would then mean it's not a web component and just typical SSR.
SSR doesn't mean that you can't use web component frameworks, just that the framework must be able to both (1) produce and manipulate DOM in the browser as output, and (2) render the same components into HTML strings on the server. I believe frameworks with this capability are categorized as "isomorphic" frameworks.
Enhance WASM essentially makes Web Components an isomorphic component framework, with a bonus (for some) of not having to use a server-side JavaScript runtime.
- danielvaughn 3y agoThat makes sense, though the first paragraph of that page talks about how web components depend on client-side javascript. My confusion is that a web component by definition has to run client-side javascript. You're either (a) using javascript to port content from a template into your custom element, or (b) using javascript to attach a shadow dom to a custom element. I could be wrong about this, but I don't believe there's a way to send down a working web component from the server without accompanying client-side logic.
- 1shooner 3y ago>I don't believe there's a way to send down a working web component from the server without accompanying client-side logic. Do you mean declarative shadow dom? That landed in FF 123, so I think it's now available on all major browsers.
- niutech 3y agoYes, this is Pure HTML Out-of-Order Streaming without JS and it works in every web browser: https://github.com/niutech/phooos https://github.com/niutech/phooos
- j45 3y agoThank you for the explanation!