I’m trying to render an ✕ and ✓, conditionally with JSX, but this approach doesn’t work.
<div>{exists ? ✓ : ✕}</div>
What would be the right solution for achieving this?
>Solution :
You have to wrap that using span and span should have an attribute of role="img" otherwise React will show warning.
<div>{true ? <span role="img">✓</span> : <span role="img">✕</span>}</div>