title: State not changing after calling this.setState
body: <p>I am getting the data from my form component and trying to set the state of my app component with this data.</p>
  
  <p>However, the state.data is an empty object and is not updating the data. I console log the model data before setting it to check if it exists. Their is data within the model.</p>
  
  <pre><code>import React, { Component, Fragment } from "react";
  import Form from "../components/Form";
  
  import product from "./product.json";
  
  class App extends Component {
  
      constructor() {
          super();  
  
          this.state = {
              data: {}
          };
  
      }
  
      onSubmit = (model) =&gt; {
  
          console.log("Outer", model);
  
          this.setState({
              data: model
          });
  
          console.log("Form: ", this.state);
      }
      render() {
  
          const fields = product.fields;
  
          return (
              &lt;Fragment&gt;
                  &lt;div&gt;Header&lt;/div&gt;
                  &lt;Form
                      model={fields}
                      onSubmit={(model) =&gt; {this.onSubmit(model);}}
                  /&gt;
                  &lt;div&gt;Footer&lt;/div&gt;
              &lt;/Fragment&gt;
          );
      }
  }
  
  export default App;
  </code></pre>