title: Can I run index.html with React without npm start and npx create-react-app?
body: <p>I am self-learning react and I am just confused about a lot of things.</p>
  <p>I thought that if I add React to my index.html via a script like the below:-</p>
  <pre><code>//index.html
  &lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  
  &lt;head&gt;
      &lt;title&gt;Bill Details&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id=&quot;billTable&quot;&gt;&lt;/div&gt;
      &lt;script src=&quot;BillTable.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; ------------- Problem Line 1
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>and this is my js file where I am trying to return react component</p>
  <pre><code>//BillTable.js
  import React from &quot;react&quot;;
  import ReactDOM from &quot;react-dom&quot;;
  
  function BillTable() {
      return &lt;h1&gt;HELLO TABLE&lt;/h1&gt;;
  }
  
  ReactDOM.render(&lt;BillTable/&gt;, document.getElementById(&quot;billTable&quot;));
  </code></pre>
  <p>when I try to open index.html directly in firefox or through express server I get the below error in console:-</p>
  <p><strong>Uncaught SyntaxError: import declarations may only appear at top level of a module</strong>.</p>
  <p>I then got rid of this error by changing the script type in problem line 1 in index.html to</p>
  <pre><code>&lt;script src=&quot;BillTable.js&quot; type=&quot;text/babel&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>but then also my webpage is completely blank and even console is not showing any errors.</p>
  <p>Please suggest how to solve this issue. I am right now trying to learn React with functional approach only, so if any changes are required to be done on the react side, please make them in the functional approach.</p>