title: How to set state in onChange when you pass down props to child component?
body: <p>I am having trouble assigning the state in my onChange function when I pass down props to a child component. I have a form that when the user submits it should update the state. </p>
  
  <p>In the past, I have set state, but without passing props, since it was in the same file, but now that I am using props in a function, I am not sure how I would set state.</p>
  
  <pre><code>const Child = props =&gt; {
  return (
  &lt;div className='form'&gt;
      &lt;Form &gt;
          &lt;Form.Row&gt;
              &lt;Col&gt;
                  &lt;Form.Control 
                  name="studentName" 
                  value={props.studentName} 
                  placeholder="Student name" 
                  onChange={this.change}  
                  /&gt;
              &lt;/Col&gt;
              &lt;Col&gt;
                  &lt;Form.Control 
                  name="studentId" 
                  value={props.studentId} 
                  placeholder="StudentID" 
                  onChange={e =&gt; this.change(e)}
                  /&gt;
              &lt;/Col&gt;
          &lt;/Form.Row&gt;
      &lt;/Form&gt;
  &lt;/div&gt;
  )}
  </code></pre>