title: Why isn't my React Form sending?
body: <p>I've used this tutorial offline and I have this: </p>
  
  <pre><code>import React from 'react';
  import '../Normalize.css';
  import '../App.css';
  import $ from 'jquery';
  
  class ReactFormLabel extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
      return(
       &lt;label htmlFor={this.props.htmlFor}&gt;{this.props.title}&lt;/label&gt;
      )
    }
  }
  
  class ReactForm extends React.Component {
    constructor(props) {
      super(props);
  
      this.state = {
      name: '',
      email: '',
      subject: '',
      message: ''
    }
  }
  
  handleChange = (e) =&gt; {
    let newState = {};
    newState[e.target.name] = e.target.value;
    this.setState(newState);
  };
  
  handleSubmit = (e, message) =&gt; {
    e.preventDefault();
  
    let formData = {
      formSender: this.state.name,
      formEmail: this.state.email,
      formSubject: this.state.subject,
      formMessage: this.state.message
    }
  
    if (formData.formSender.length &lt; 1 || formData.formEmail.length &lt; 1 || formData.formSubject.length &lt; 1 || formData.formMessage.length &lt; 1) {
    return false;
    }
  
    $.ajax({
      url: '/some/url',
      dataType: 'json',
      type: 'POST',
      data: formData,
      success: function(data) {
      if (window.confirm('Thank you for your message. Can I erase the form?')) 
  {
   document.querySelector('.form-input').val('');
  }
  },
  error: function(xhr, status, err) {
    console.error(status, err.toString());
    alert('There was some problem with sending your message.');
   }
  });
  
  this.setState({
    firstName: '',
    lastName: '',
    email: '',
    subject: '',
    message: ''
  });
  };
  
  render() {
    return(
      &lt;form className='react-form' onSubmit={this.handleSubmit}&gt;
        &lt;fieldset className='form-group'&gt;
          &lt;ReactFormLabel htmlFor='formName' title='Full Name:' /&gt;
          &lt;input id='formName' className='form-input' name='name' type='text' required onChange={this.handleChange} value={this.state.name} /&gt;
        &lt;/fieldset&gt;
        &lt;fieldset className='form-group'&gt;
          &lt;ReactFormLabel htmlFor='formEmail' title='Email:' /&gt;
          &lt;input id='formEmail' className='form-input' name='email' type='email' required onChange={this.handleChange} value={this.state.email} /&gt;
        &lt;/fieldset&gt;
        &lt;fieldset className='form-group'&gt;
          &lt;ReactFormLabel htmlFor='formSubject' title='Subject:'/&gt;
          &lt;input id='formSubject' className='form-input' name='subject' type='text' required onChange={this.handleChange} value={this.state.subject} /&gt;
        &lt;/fieldset&gt;
        &lt;fieldset className='form-group'&gt;
          &lt;ReactFormLabel htmlFor='formMessage' title='Message:' /&gt;
          &lt;textarea id='formMessage' className='form-textarea' name='message' required onChange={this.handleChange}&gt;&lt;/textarea&gt;
        &lt;/fieldset&gt;
        &lt;div className='form-group'&gt;
          &lt;input id='formButton' className='btn' type='submit' placeholder='Send message' /&gt;
        &lt;/div&gt;
      &lt;/form&gt;
      )
    }
   };
  
  export default ReactForm;
  </code></pre>
  
  <p>I think it has something to do with this section: </p>
  
  <pre><code>$.ajax({
      url: '/some/url',
      dataType: 'json',
      type: 'POST',
      data: formData,
      success: function(data) {
      if (window.confirm('Thank you for your message. Can I erase the form?')) 
  {
   document.querySelector('.form-input').val('');
  }
  </code></pre>
  
  <p>With the URL but I'm not too sure where to send it to? Is there something very simple I am overlooking here? It renders fine, it validates fine, it's just not sending. I followed this tutorial: <a href="https://blog.alexdevero.com/insanely-easy-simple-react-form-tutorial/" rel="nofollow noreferrer">https://blog.alexdevero.com/insanely-easy-simple-react-form-tutorial/</a></p>
  
  <p>Thanks! </p>