4 ms·
I use shadow DOM every day, but yes, it is often the part of WCs that baffles people – probably because they don't need it. Alternative approaches that may wor
by nolanl 2y ago
I use shadow DOM every day, but yes, it is often the part of WCs that baffles people – probably because they don't need it.
Alternative approaches that may work for your use case:
- "HTML web components" [1] - light DOM only, SSR-first, good as a replacement for "jQuery sprinkles"
- "Shadow gristle" [2] - use as little shadow DOM as possible. If you need styling or composition, put it in the light DOM!
[1]: https://adactio.com/journal/20618 https://adactio.com/journal/20618
[2]: https://glazkov.com/2023/03/02/shadow-gristle/ https://glazkov.com/2023/03/02/shadow-gristle/