-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API doesn't match for virtual-dom - no way to set attributes? #37
Comments
attributes
and props
?attributes
and props
? API doesn't match for virtual-dom
attributes
and props
? API doesn't match for virtual-dom
Tried
So basically this approach does not work with web components reliant on Specifically, I was using |
Maybe it would work if you created a thin wrapper around |
Hi
If am creating a tree that includes a webcomponent which updates on
attributeChangedCallback
. However, throughhyperx
, all specified attributes end up being passed tovirtual-dom
as props, because attributes need to be all passed together within anattributes
sub-object.Currently with a view like below:
...all the three attributes end up being assigned directly to the DOM element rather than via
setAttribute
.I realize this is perhaps because
virtual-dom
does not adhere to the hyperscript API (as specified,h(tagName, attrs, children)
, whenvirtual-dom
actually takesh(tagName, props ={attributes: {} }, children)
). But ifhyperx
shouldn't be expected to account for these differences, then the documentation should probably be updated to let people know it won't work as expected withvirtual-dom
specifically and save some time :) Thanks!The text was updated successfully, but these errors were encountered: