Reputation: 11095
How can I make the following work in React?
<input type="text" placeholder=" Location" />
I looked at dangerouslySetInnerHTML
but that is not for setting props such as placeholder
Upvotes: 2
Views: 877
Reputation: 26787
You can use a JS string with escape sequence (I don't know what character U+f124
is so I substituted U+00C2
[Â
], but it can be whatever code point):
<input type="text" placeholder={"\u00C2 Location"} />
Upvotes: 2