2 ms·
That really depends on how you want to use web components. I have used custom elements quite a few times with Astro, mostly leveraging custom elements for life
by _heimdall 3y ago
That really depends on how you want to use web components. I have used custom elements quite a few times with Astro, mostly leveraging custom elements for life cycle events.
I end up with a `.astro` file that server renders the HTML and adds a script to define the custom element. In the browser its more pike cheap hydration - the custom element doesn't re-render anything up front, it will just grab references to the server rendered DOM nodes and setup event handlers.
I know Lit has an SSR helper, though I haven't used it myself I think its supposed to make server rendering you lit web components much easier.