6 ms·
Yes what you need to do as a workaround is a BUG in react, not a problem with WC's - and I think Dan Abramov tweeted that this will be solved eventually (I can'
by ergo14 7y ago
Yes what you need to do as a workaround is a BUG in react, not a problem with WC's - and I think Dan Abramov tweeted that this will be solved eventually (I can't find the exact tweet) - In Vue, svelte, Angular or even preact you would be able to do <my-component prop={something} /> just fine, no need to mess with HTMLEntity. If this is fixed this should be transparent to you and work the same way, you should be able to mix and match both kinds of components.
See here https://custom-elements-everywhere.com/ https://custom-elements-everywhere.com/ a list of popular libraries and how they handle events and props.
- TomMarius 7y agoI meant when I'm not using react
- ergo14 7y agoI have no idea what you meant by that statement.
- TomMarius 7y agoI didn't talk about React-WC cooperation, I was talking about passing props around WebComponents when using WebComponents alone - it allows you to pass only plain values, otherwise you need the underlying HTMLEntity
- ergo14 7y agoI still have no idea what you mean by that, implementation detail? I have passed props using WC's alone in a declarative way via LitElement - all other popular solutions allow that too.