title: Fetch callback in React
body: <p>I am trying to have a simple print run statement to ensure the callback is working correctly.</p>
  
  <pre><code>var CsvUpload = React.createClass({
    uploadfile: function() {
      console.log('trying')
      var file = this.refs.file.files[0];
      var formData = new FormData()
      formData.append('files', file)
  
      fetch('http://127.0.0.1:5000/add_csv_to_db', {
        method :'POST',
        body : formData
      })
      .then(() =&gt; {console.log('this worked')})
      .catch((err) =&gt; {console.log(err)})
    },
  
    render: function() {
      return (
        &lt;div&gt;
          &lt;h4 className='sub-header'&gt;CSV Upload&lt;/h4&gt;
          &lt;form onSubmit = {this.uploadfile} encType="multipart/form-data"&gt;
            &lt;input type="file" name="file" ref="file"/&gt;
            &lt;button type="submit" className="btn btn-primary"&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      )
    }
  })
  </code></pre>
  
  <p>On the server:</p>
  
  <pre class="lang-python prettyprint-override"><code>@app.route('/add_csv_to_db', methods=['GET','POST'])
  def add_rows():
      file = request.files['files']
      x = io.StringIO(file.read().decode('UTF8'), newline=None)
      csv_input = csv.reader(x)
      for row in csv_input:
          if row[0] == 'Email':
              pass
          else:
              print(row)
              tasks.add_User(row)
      print('completed')
      return json.dumps('success!')
  </code></pre>
  
  <p>I see "completed" print out in the server.</p>
  
  <p>In the console I see <code>"trying"</code> but it doesn't print <code>"This worked"</code></p>
  
  <p>What am I doing wrong?</p>