Reputation: 4144
Is there any way to pass FontAwesome as an element prop? I'm trying to do something like
<input
placeholder={" Search " + searchFor}
/>
but that will display hex code as a string rather than decode to proper font value when it will be as
placeholder=" Search ..."
Any tips on that?
Upvotes: 0
Views: 131
Reputation: 1707
You are trying to HTML-encode your UTF-8 symbol, which does not work because React is not HTML (although it looks a lot like it...)
So if you don't use the HTML-encoding but instead the JavaScript encoding "\uF002", your symbol should be displayed the way you want it.
Upvotes: 1