title: How to disable a button when an input is empty?
body: <p>I'm new to React. I'm trying to disable a button when an input field is empty. What is the best approach in React for this?</p>
  <p>I'm doing something like the following:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;input ref=&quot;email&quot;/&gt;
  
  &lt;button disabled={!this.refs.email}&gt;Let me in&lt;/button&gt;
  </code></pre>
  <p>Is this correct?</p>
  <p>It's not just duplication of the dynamic attribute, because I'm also curious about transferring/checking the data from one element to another.</p>