Replies: 10 comments
-
|
Could it be that your custom element requires attributes rather than properties? Maybe try |
Beta Was this translation helpful? Give feedback.
-
|
@atk Like this? it equal result. |
Beta Was this translation helpful? Give feedback.
-
|
@atk users can register custom attribute. |
Beta Was this translation helpful? Give feedback.
-
|
The thing is attributes can't accept rich values(objects, arrays, functions) so we default to handling them as properties on custom elements with the expectation most web component libraries will be able to handle either. Hmm.. looks like forcing But before I'd go there I'd focus on the original example. Just because you don't see an attribute reflected doesn't mean it isn't working. I'm assuming it isn't otherwise we wouldn't be here. First is |
Beta Was this translation helpful? Give feedback.
-
|
Wow. |
Beta Was this translation helpful? Give feedback.
-
|
Umm... Unfortunately, it is not working as intended. https://codesandbox.io/s/cocky-monad-vz2hxv?file=/src/App.jsx this code is working // working
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>but, this code is not working function Box(props) {
const { children, ...others } = props;
return <a-box {...others}>{children}</a-box>;
}
// ...
// not working
<Box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" /> |
Beta Was this translation helpful? Give feedback.
-
|
I found this. |
Beta Was this translation helpful? Give feedback.
-
|
I use ref and success insert custom props. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah. This is getting into that territory where there is some question about how to prioritize this case over standard Web Component case. Most of the time with Web Components you want the ability to set properties as well as attributes so libraries handle both. This seems like just some random HTML element that our heuristics treat like a Web Component but it's just an unknown element. I checked your examples and My recommendation is probably just making a wrapper of sorts. Or intercepting property access with a Custom Element. Because even with spreading @trusktr I'm looking at this vs custom element and I don't see a great way to keep it consistent without basically pushing the cost onto the library if it doesn't support setting properties. We need to be able to set properties for rich data with Web Components. From your experience with Lume, any thoughts? |
Beta Was this translation helpful? Give feedback.
-
|
This issue isn't going anywhere. I don't see this changing. I don't want to just close it though because there is some potential relevant discussion here about handling of arbitrary elements. So moving to discussions. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Hello, I'm maintainer of @belivvr/aframe-react.
I'm doing make
aframe-solid, but I meet under issue.div)a-box. custom tag of AFRAME)I was first meet this issue when I use jest to rendering test.
Your Example Website or App
https://playground.solidjs.com/?version=1.3.13#NobwRAdghgtgpmAXGGUCWEwBowBcCeADgsrgM4Ae2YZA9gK4BOAxiWGjIbY7gAQi9GcCABM4jXgF9eAM0a0YvADo1aAGzQiAtACsyAegDucAEYqA3EohWZ9CM1xpaEXgGVYhNXAAUheYTIASn4rXl5mZzI+AWYACzQ1ESEILF4AOgzaXFjxMileAF5eP1oAyxdBOFwmF29QsN4AHgA+eoamqC0TWgp+DLSsnMYySWaQOISk4WlO7opG-Vme1or2xpE0ADc+zOzc0fH4xOTpDc2Fs5W1-SveQPLJKytksUY6iu9gguam904vXgAazg+AKKk2UDU9DgKmaZA8XgWf08cGaWHqIlozHo8AguDSAHMqgBRLy43AAIXwAEkRHUwFBCIQVIF0RB7lYwJIALpAA
Steps to Reproduce the Bug or Issue
a-box)Expected behavior
When I write under code
I want see under code in browser
Screenshots or Videos
Platform
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions