Allow `key` prop on SVG
Closed this issue · 6 comments
I just tried this with unsafeCreateDOMComponent and it works, so I suppose there's no good reason for not having it.
If there's interest, I can try to add it.
Sure, I think it should be on all those elements
This one is a bit trickier because it uses the SVG props library. What would you suggest as an approach for this? Fork the library? Inline and modify it? Modify the values after importing it?
I had a similar issue with the HTML attributes, which used to come from the react-html-attributes package. There's simply too much friction to liaise with upstream over each change, so I decided to make a local copy of the JSON file from that package. Haven't upstreamed my changes yet, need to get round to that!
Hey thank you so much for addressing this? I don't understand what the linked PR does? Do you think you could explain it in one or two sentences?
Most of the PR was an unrelated change, but while I was altering the codegen anyway I changed it to always add ref, key, _data, and (optionally) children. Previously it was defined in the json file.
Ah thank you very much for explaining this!