title: 'TypeError: NetworkError when attempting to fetch resource' on form submit ReactJS
body: <p>I tried to fetch some data from my API with Cross-Origin enabled but got this error.<br />
  Same thing with <a href="https://jsonplaceholder.typicode.com/" rel="nofollow noreferrer">JSONPlaceholder</a> (an online REST API for testing) using an example they provide :</p>
  <pre><code>fetch('https://jsonplaceholder.typicode.com/todos/1')
    .then(response =&gt; response.json())
    .then(json =&gt; console.log(json))
  </code></pre>
  <p>Both requests (JSONPlaceholder and my API) work fine using Insomnia (a REST client), so my guess is that the problem is in my React application (16.13.1).</p>
  <h2>EDIT</h2>
  <p>After some tests, it seems that the error only occurs when calling the fetch function from a <code>&lt;form&gt;</code>, here are some details :</p>
  <pre><code>handleSubmit = () =&gt; {
     fetch('https://jsonplaceholder.typicode.com/todos/1')
    .then(response =&gt; response.json())
    .then(json =&gt; console.log(json))
  }
  </code></pre>
  <pre><code>&lt;form onSubmit={this.handleSubmit} &gt;
      &lt;button type=&quot;submit&quot;&gt;FETCH&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Thanks.</p>