title: Axios post requests are not working with events using ReactJS
body: <p>Been quite stuck for the past week or so and cannot find any answers to my issue. Today I started doing some proper investigating. It looks like Axios is not working when firing events. This also does not work on my main PC either which makes me think it's actually a bug with Axios.</p>
  <p>I have already tried:</p>
  <ul>
  <li>Reinstalling Axios independently</li>
  <li>Uninstalling all global dependencies I have</li>
  <li>Creating a new React App</li>
  <li>Checking the events are firing (which they are)</li>
  <li>Checking my network tab (nothing shows up)</li>
  </ul>
  <p>My post request is working fine when just calling it as a function:</p>
  <pre class="lang-js prettyprint-override"><code>import React from &quot;react&quot;;
  import axios from &quot;axios&quot;;
  import &quot;./App.css&quot;;
  
  function App() {
    const makeRequest = () =&gt; {
      axios.post(&quot;http://localhost:5000&quot;);
    };
  
    makeRequest();
  
    return &lt;div className=&quot;app&quot;&gt;&lt;/div&gt;;
  }
  
  export default App;
  
  </code></pre>
  <p>Backend output: <code>There was a post request!</code></p>
  <p>However, my code does not work when using events, this goes for <code>onClick</code> and <code>onSubmit</code> (that's what I have tested anyway):</p>
  <pre class="lang-js prettyprint-override"><code>import React from &quot;react&quot;;
  import axios from &quot;axios&quot;;
  import &quot;./App.css&quot;;
  
  function App() {
    const makeRequest = () =&gt; {
      axios.post(&quot;http://localhost:5000&quot;);
    };
  
    return (
      &lt;div className=&quot;app&quot;&gt;
        &lt;button onClick={makeRequest}&gt;Post Request&lt;/button&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p>No backend output or frontend output. Help would be much appreciated!</p>
  <p>Edit: Something I forgot to mention was that <code>fetch</code> works absolutely fine, but I'd really rather use Axios where possible.</p>