title: onClick to call function from another JS file with react
body: <p>I have the following html code in my render react component:</p>
  
  <pre><code>&lt;button id="execute-request-button"&gt;Authorize&lt;/button&gt;
  </code></pre>
  
  <p>And I am trying to call this function from my external JS file  </p>
  
  <pre><code>$("#execute-request-button").click(function() {
      console.log("CLICK");
  
      handleAuthClick(event);
  });
  </code></pre>
  
  <p>I am calling the external JS file in my HTML as well. It doesn't print to the console when I click my authorize button. Also I console logged at the very first of the external JS file to see if it's loaded and its not. I know the file path is right since I am not getting any errors. </p>
  
  <p>Any thoughts?</p>
  
  <hr>
  
  <p><br/>
  <strong>EDIT</strong><br/>
  I moved my script tag to the top of my html file .<br/> 
  <code>&lt;script src="../src/YoutubeAPI/upload.js"&gt;&lt;/script&gt;</code><br/> and I get the following error<br/> <code>Refused to execute script from 'http://localhost:3000/src/YoutubeAPI/upload.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.</code></p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html lang="en"&gt; 
      &lt;head&gt;   
        &lt;script src="../src/YoutubeAPI/upload.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
        &lt;title&gt;STEMuli&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;noscript&gt;
          &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
            crossorigin="anonymous"&gt;&lt;/script&gt;
          &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
            crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;/noscript&gt;
        &lt;div id="root"&gt;&lt;/div&gt;
      &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>