title: Can I set an input field to readonly in React while keeping my onChange function?
body: <p>I have the following React render function:</p>
  
  <pre><code>render: function() {
    return &lt;input type="text" name="my-input-field" value={this.state.myObject} onChange={myFunction} /&gt;;
  }
  </code></pre>
  
  <p>I would like to have this input field be readonly upon some condition that I have checked for. My understanding is that this input field would default to readonly if I didn't have the onChange function. Simply adding the readOnly tag hasn't worked for me.</p>
  
  <p>How can i rewrite this so that I can later change the readonly status? </p>