Closed FLE92 closed 5 years ago
(Of course it works with lodash, but that's not an ideal solution...)
In JSX syntaxy you can't add colons. but you can pass an object
const Test = 'Test'
const props = { 'abc:def': "teststring" }
const xml = <Test {...props} />
or create object inline
const xml = <Test {...{ 'abc:def': "teststring" }} />
// output: <Test abc:def="teststring"/>
Hello again, Many Thanks again for your quick response! This way works perfectly! Your work is a great help to me. Many greetings, FLE92
update: typescript v5.1 will support "Namespaced JSX Attributes". I'm not tested that yet.
Hello again, is there any possibility to add attributes with colons like:
<Test abc:def="teststring"/>
Thanks for help!