4 ms·
As an alternative, check out Stencil.js. If you are componentizing within a controlled environment, then the shadow DOM feels like an unnecessary complexity.
by psygn89 3y ago
As an alternative, check out Stencil.js. If you are componentizing within a controlled environment, then the shadow DOM feels like an unnecessary complexity. If the style collisions are a concern, you can turn on Stencil's scoped styling which dynamically creates unique css classes. It also has popular framework bindings so that you can output your components to work with different frameworks along with native web components.
However, if you are wanting to share your components with the world, starting with fresher code, and/or have the resources to tackle the shadow DOM gotchas then I would consider Lit over Stencil.
Just dropping this out here for those in the research phase as it wasn't super clear to me at first which way to go. Both are really good options but better for certain situations.