title: React: trigger onChange if input value is changing by state?
body: <p><strong>Edit:</strong> I don't want to call handleChange only if the button has been clicked. It has nothing to do with handleClick. I gave an example in the @shubhakhatri answer's comment.</p>
  
  <p>I want to change the input value according to state, the value is changing but it doesn't trigger <code>handleChange()</code> method. How can I trigger <code>handleChange()</code> method ? </p>
  
  <pre><code>class App extends React.Component {
    constructor(props) {
      super(props)
      this.state = {
      value: 'random text'
      }
    }
    handleChange (e) {
      console.log('handle change called')
    }
    handleClick () {
      this.setState({value: 'another random text'})
    }
    render () {
      return (
        &lt;div&gt;
          &lt;input value={this.state.value} onChange={this.handleChange}/&gt;
          &lt;button onClick={this.handleClick.bind(this)}&gt;Change Input&lt;/button&gt;
        &lt;/div&gt;
      )
    }
  }
  
  ReactDOM.render(&lt;App /&gt;,  document.getElementById('app'))
  </code></pre>
  
  <p>Here is the codepen link: <a href="http://codepen.io/madhurgarg71/pen/qrbLjp" rel="noreferrer">http://codepen.io/madhurgarg71/pen/qrbLjp</a></p>