I'm porting a Kotlin / React app to the new HTML D...
# javascript
g
I'm porting a Kotlin / React app to the new HTML DSL. Previously I could insert a wastebasket icon into a span like this:
attrs.unsafe { +"🗑" }
But this is not supported in the new syntax. I have tried:
dangerouslySetInnerHTML!!.__html = "🗑"
But no luck...
j
Does this work for you:
Copy code
unsafe {
    raw("🗑")
}
g
unsafe does not seem to be found...
j
You are talking about kotlinx.html?
g
I very much hope so 😄 I've created a Kotlin / React project in the latest version of IntelliJ and am working through all the changes I find...
t
Copy code
dangerouslySetInnerHTML = jso {
    __html = "🗑"
}
g
That works - thank you. I knew that in regular React you set it to an object with an html property, but was assuming thats what the existing
__html
property was for. Any idea why it's there?
t
Describe please, which API was expected from your side (to clarify question)
g
My fault. I misunderstood the API. Worked it out for myself. Thanks again.