title: React: How to render a text/html http response?
body: <p>I am creating an app that uploads an .xls file to a server, and the response is a text/html response. I would like to preview the response (exactly as in the developer tool).
  Something like:</p>
  <pre><code>        axios.post(config.serverUrl + &quot;/file&quot;, formData)
              .then(response =&gt; {
  
                  //Preview response code
              }
  </code></pre>
  <p>I tried <code>dangerouslySetInnerHTML={{ __html: {response.data} }}</code> but that did not work.</p>
  <p>Response example:</p>
  <pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;style&gt;table, td{    border: 1px solid black;
      border-collapse: collapse;
      padding: 9px;
  }&lt;/style&gt;&lt;title&gt;file3500064108648651012.tmp&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;
  &lt;tr&gt;&lt;td&gt;Sheet 1&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Test&lt;/td&gt;&lt;td&gt;Test1&lt;/td&gt;&lt;td&gt;Test2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;test&lt;/td&gt;&lt;td&gt;test1&lt;/td&gt;&lt;td&gt;test2&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  <p>The preview should then look like:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;style&gt;table, td{    border: 1px solid black;
      border-collapse: collapse;
      padding: 9px;
  }&lt;/style&gt;&lt;title&gt;file3500064108648651012.tmp&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;
  &lt;tr&gt;&lt;td&gt;Sheet 1&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Test&lt;/td&gt;&lt;td&gt;Test1&lt;/td&gt;&lt;td&gt;Test2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;test&lt;/td&gt;&lt;td&gt;test1&lt;/td&gt;&lt;td&gt;test2&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>