title: react-select handle onChange with props
body: <p>I am using react-select in a child component but wanting to store the Select value in a state in the parent.</p>
  
  <p>I appreciate that I have to store onChange in state and then pass this to the Select value, but I would like to keep this temporary onChange state in the child component not the parent.</p>
  
  <p>So the question is how do I set the parent state (coming in on a prop) from the onChange state in the child.</p>
  
  <p><strong>Parent Component</strong></p>
  
  <pre><code>campaignName (campaign){
    //will setState here
     console.log(campaign)
    }
  ...
  &lt;FormGroup&gt;
    &lt;Campaign
      campaignName={this.campaignName.bind(this)}
      campaignOptions={code in here that sets option}
     /&gt;
  &lt;/FormGroup&gt;
  </code></pre>
  
  <p><strong>Child Component</strong></p>
  
  <pre><code>updateValue (newValue) {
      this.setState({
          selectValue: newValue,
    // how do I set the parent state from this 
      });
  
  &lt;Select
     onChange={this.updateValue}
     value={this.props.campaignName}
     options={this.props.campaignOptions}
  /&gt;
  </code></pre>