Setting className to custom tag fails
unclechu opened this issue · 3 comments
unclechu commented
purescript-react is v5.1.0
When I declare my own tag name by this command:
createElementTagName "my-own-tag-name" [className "container"]And then when its rendered I got this tag in DOM tree but without class attribute and I see this warning in log:
Warning: Invalid attribute name: `0`
warning.js:33
unclechu commented
Maybe I misunderstood something? I just used
mkDOM (IsDynamic false) "my-own-tag-name" [class "container"]instead and it works.
unclechu commented
I think I get it, createElementTagName is free to put anything as props, so I put array when I supposed to put a record, am I right?
ethul commented
Yes, you're correct. The props would have to be a record in this case.