Hacker News new | ask | show | jobs
by dgb23 1026 days ago
If I understood you correctly, then we’re exactly on the same page. That is, web components being a standalone thing that you render “as is” on the server. Their point is to extend interaction on the client and not to be a templating language on the server.

The author mentioned Lit not having a stable SSR story (a small, fast library to leverage web components).

My suspicion here is that some do too much within their components that they want to render on the server.

There’s two possible solutions already:

1. Don’t generate all your html inside the component (in js), but instead use the component to enclose markup that you render on the server.

2. Decouple html rendering (lit-html) from your component. If your component calls a function that spits out html, so can your server (if it runs JS).