How do you render HTML entities to the DOM using ReasonML/ReasonReact?
HTML Entities in ReasonML/ReasonReact
arecvlohe
#3
It looks like this works for only a certain set of characters at the moment. I was trying to create menu bars:
arecvlohe
#4
Ah, I have to use dangerouslySetInnerHTML={{ "__html": "☰" }}
. Didn’t want to have to do that but oh well.
glennsl
#5
I don’t see why that wouldn’t work with just Unicode, but yeah if you have to emit actual HTML entities then you have to wrap it in another element.
This is an issue with React, not Reason or ReasonReact, btw, so other solutions might be, or become, possible if React enables them.