Remix.run Logo
_heimdall 14 hours ago

That approach passes values in JS rather than the DOM, right? I read the go comment as talking specifically about DOM attributes which can only be strings (well, you can have boolean attributes as well).

Web components can be passed objects in JS, but its news to me if that is available in HTML.

bythreads 13 hours ago | parent | next [-]

Neither can react

_heimdall 13 hours ago | parent [-]

I didn't say it can, I never actually mentioned react at all here.

moron4hire 11 hours ago | parent | prev [-]

I generally think the reflex to try to pass an object to an attribute on an element is a code-smell that the element hasn't been properly decomposed into sub-components. In those cases, I look more to adding child elements to represent those objects as an HTML serialization of the object.