title: How to pass Unicode characters as function parameters in React
body: <p>I am trying to achieve something similar to this question
  <a href="https://stackoverflow.com/questions/14984007/how-do-i-include-a-font-awesome-icon-in-my-svg">How do I include a font awesome icon in my svg?</a></p>
  
  <p>but I have 10 icons which has similar structure but only icon differs
  I have return a function to generate the Unicode character 
  as</p>
  
  <pre><code>static renderIcon (status) {
      if (status === 'RED') {
        return '&amp;#xf126;'
      } else if (status === 'GREEN') {
        return '&amp;#xf121;'
      } else if (status === YELLOW') {
        return '&amp;#xf11d;'
      }
    }
  
  static renderTextWithIcon = (obj) =&gt; {
      return (
          &lt;text x={params.cx} y={params.cy}
           className={ css.color}
           &gt;
            {Utils.renderStatusIconContent(obj.status)}
          &lt;/text&gt;
          )
    }
  </code></pre>
  
  <p>But it renders the strings as '&#xf126;' if I try to give without quotes it accepts and shows the icon,but I have to repeat the same code for each color. How can I write a function which take the Unicode characters as parameters?</p>