share context through web-components

using solid-element, is it possible to create a custom-element that provides a context and have other custom elements use this context? eg sth like
<my-context-provider>
<my-context-user1>
<my-context-user11>
...
</my-context-user11>
</my-context-user1>
</my-context-provider>
<my-context-provider>
<my-context-user1>
<my-context-user11>
...
</my-context-user11>
</my-context-user1>
</my-context-provider>
I want to use these elements in HTML, not in JSX.
2 Replies
mdynnl
mdynnl8mo ago
it should be working if you're using latest solid https://stackblitz.com/edit/github-eh7fia?file=App.tsx
sebb8200
sebb8200OP8mo ago
Wow that's nice. I don't think you can do that with Lit, can you? I just tried it in the browser in plain HTML, just importing, two separate js-modules. Works like a charm. Wonder if I can make a customElement from a solid-dnd DragDropProvider and drag stuff from one WC to another.
Want results from more Discord servers?
Add your server