Isn't reusable
janat08 opened this issue · 4 comments
https://jsfiddle.net/fwLbqmsj/
Using your own example, i've appended another element and the second instance won't run.
You need to close your tag the same as you do with a script tag. <my-time country="uk"></my-time>
it's just a quirk of the web, that some tags must be close ¯_(ツ)_/¯
I guess it's using wire with id that makes it unreusable.
This closing of tags is part of the browser not hyperHTML.
This is an example
https://jsfiddle.net/bccqa5n1/1/
You can see that custom tags defined in the page must have a matching closing tag or it will just stay open. BUT you can have a self closing custom tag inside you render because hyperHTML v2.5 will now automatically add the matching closing tag
The issue is in fact about when you use hyperhtml.wire(obj, "ID")``, and then try to render a component that holds this wire id twice making it fail, which in my case like the whole app is based on. I'll close this as this is upstream without opening one in hyperhtml.