title: React js render html string returned from server
body: <p>From php im returning this html</p>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$str = "Hello World";
  echo json_encode("returnval"=&gt;format_string($str));
  
  function format_string($str){
    return "&lt;b&gt;".$str."&lt;/b&gt;";
  }
  </code></pre>
  
  <p><strong>React JSX</strong></p>
  
  <pre><code>render () =&gt; {
     //returnval = html string returned from php
  
     return (
       &lt;div&gt;
           {returnval} 
           &lt;div&gt;
                &lt;span&gt;Some data&lt;/span&gt;
           &lt;/div&gt;
       &lt;/div&gt;
     );
  }
  </code></pre>
  
  <p>The above prints <code>&lt;b&gt;Hello World&lt;/b&gt;</code> as a text .</p>
  
  <p>But i want the html tags to be <em>executed</em> (in this case as bold)</p>
  
  <p>I cannot write the <code>format_string</code> function in jsx for some reasons is there any way around this ?</p>