3 ms·
I avoid using them, except when having to expose a component to a third party, if they _really_ want the ergonomics of using WCs. Then I'd use something like h
by baxuz 4y ago
I avoid using them, except when having to expose a component to a third party, if they _really_ want the ergonomics of using WCs.
Then I'd use something like https://github.com/preactjs/preact-custom-element https://github.com/preactjs/preact-custom-element, https://stenciljs.com/docs/custom-elements https://stenciljs.com/docs/custom-elements or https://github.com/solidjs/solid/tree/main/packages/solid-element#readme https://github.com/solidjs/solid/tree/main/packages/solid-el....
As far as I see, there is nothing that WCs provide which isn't already solved, in a better way, both for devs and users.
And making a framework that use custom elements and shadow DOM for component-based logic and encapsulation seems like a purely philosophical approach to adhere to some vision of "platform purity".