Web Awesome works in React, Vue, Svelte, Astro, Rails, and that .html file from 2009 you're scared to open.
They're web components. They don't care about your framework drama.
Also posted to Bluesky.
15 replies
-
DSD - Declarative ShadowDOM is handled by the Browser
-
What's the use case for using DSD in a Nuxtjs app?
-
Why do you need a shadow DOM in a Vuejs template? Nuxt has SSR and Vuejs already has slots and style encapsulation (although not as strict as a shadow DOM).
They said NextJS not Nuxt 😅
And I dont think they implied writing the shadom dom directly. They're saying if they use a library of web components that can be SSR'ed (like Web Awesome) NextJS' Lit adapter only renders "Shallowly" without the shadow dom, and produces hydration errors in some cases.
🤦♂️ I guess I read want I wanted to see. Sorry about that.
happens to the best of us 😅
It's tough when the metaframework ignores web standards.
-
I modified the Astro SSR + DSD adapter one and fixed some bugs and it works with the latest version of Astro:
I have a PR to Nuxt to upgrade to latest version of Lit that has languished:
(and looks like other PRs have improved on my PR)
I have a small example using Vue + Vite:
Svelte is probably next on my list to look at.
NextJS seems like the odd one out for SSR, mostly because theres no real hooks into it, and last I heard talks stalled with the Next team and the Lit team.
Sorry, I misread that.
I agree. I'm not a big fan of the framework-specific solutions and would prefer a standards-based solution.
I was hoping Declarative Custom Elements could help in this area.
-
-