title: react - pass parent value to child input value
body: <p>I am new to reactjs. 
  What is the proper way to pass the parent value to child <code>setState</code>, I am having error says below, and I am unable to change input value, the value looks correct but unable to be changed.</p>
  
  <blockquote>
    <p>"is changing an uncontrolled input of type text to be controlled.
    Input elements should not switch from uncontrolled to controlled (or
    vice versa). Decide between using a controlled or uncontrolled input
    element for the lifetime of the component"</p>
  </blockquote>
  
  <pre><code>export default class parent extends React.Component {
      constructor (props) {
          super(props);
          this.state = {
              title: ''
          }
      }
  
      updateFun(){
          this.setState({title: 'Parents title'});
      }
  
      render() {
          return (
              &lt;div&gt;
              &lt;button onClick={() =&gt; this.updateFun()}&gt; Update &lt;/button&gt;
              &lt;Child title = {this.state.title}/&gt;
              &lt;/div&gt;
          )
      }
  }
  
  
  export default class Child extends React.Component {
      constructor (props) {
          super(props);
          this.state = {
              title: ''
          }
      }
  
      render() {
          return (
              &lt;div&gt;
              &lt;input 
                  id="title" 
                  type="text"
                  value={this.props.title}
                  /&gt;
              &lt;/div&gt;
          )
      }
  }
  </code></pre>