title: Disable/Enable submit button in React JS USING FUNCTION
body: <p>I want to disable/enable a form submit button using a function.<br>
  Here is my code to explain what I want:  </p>
  
  <pre><code>isDisabled = () =&gt; {
      //logic to define if button should be disabled or not
      //return boolean true or false based on that
  }
  
  
  render() {
      return (
          &lt;form className="forgot-password-form"&gt;
              //form fields
              &lt;input type="submit" value="Submit" disabled={this.isDisabled} /&gt;
          &lt;/form&gt;
      );
  }
  </code></pre>
  
  <p>This is just to show an idea what I want to do :) Of course <code>render()</code> will be in component and all.</p>
  
  <p>Currently it gives me warning:</p>
  
  <blockquote>
    <p>Warning: Invalid value for prop <code>disabled</code> on  tag. Either remove it from the element, or pass a string or number value to keep it in the DOM.</p>
  </blockquote>
  
  <p>Thank you all for your help.</p>