title: componentDidMount is not called when select value state updated
body: <p>I am trying to do async call to fetch data when dropdown value is not '--'.
  componentDidMount is not called when select value state updated.</p>
  
  <pre><code>const { Fragment } = React;
  export class HierarchySelect extends Component {
    constructor (props) {
      super(props);
      this.state = {
        department: '',
        sections: [],
        section: '--'
      };
    }
  
    componentDidMount () {
      if (this.state.section !== '--') {
        console.log('inside check');
        axios({
          method: 'GET',
          url: constants.url,
          headers: {
            'x-access-token': authService.getAccessToken()
          }
        }).then((res) =&gt; {
          if (res.status === 200) {
            console.log('hulalala', res);
          }
        })
          .catch((err) =&gt; { console.log(err); });
      }
    }
  
    handleChange (value, type, error) {
      switch (type) {
        case 'section':
          this.setState({
            section: value,
            class: '--'
          });
          this.props.getClasses({ department: this.state.department, section: value });
          break;
        default:
      }
    }
  
    render () {
      return (
        &lt;Fragment&gt;
          &lt;select id="lang" className="department" onChange={e =&gt; this.handleChange(e.target.value, 'department')} value={this.state.department}&gt;
            {['--', ...this.props.deptHierarchy.data.map(obj =&gt; obj.depId).sort((a, b) =&gt; a - b)].map(d =&gt; &lt;option key={d} value={d}&gt;{d}&lt;/option&gt;)}
          &lt;/select&gt;
          &lt;select id="lang" className="section" onChange={e =&gt; this.handleChange(e.target.value, 'section')} value={this.state.section}&gt;
            {['--', ...this.state.sections].map(d =&gt; &lt;option key={d} value={d}&gt;{d}&lt;/option&gt;)}
          &lt;/select&gt;
        &lt;/Fragment&gt;
      );
    }
  }
  
  export default HierarchySelect;
  </code></pre>
  
  <p>How to do async call when we select the particular value from the dropdown or when option value is not '--'.</p>