title: Deactivate input in react with a button click
body: <p>I have this basic component and I want the textfield to be deactivated or activated whenever I click on a button. How can I achieve this?</p>
  
  <p>This is my sample code:</p>
  
  <pre><code>import React from "react";
  import Button from 'react-button'
  
  const Typing = (props) =&gt; {
      var disabled = "disabled";
      var enabled = !disabled;
  
    const handleUserInput = (event) =&gt; props.onUserInput(event.target.value);
    const handleGameClik = (props) =&gt; {
  
        disabled = enabled;
    }
    return(
        &lt;div&gt;
  
            &lt;input
                className = "typing-container"
                value = {props.currentInput}
                onChange = {handleUserInput}
                placeholder=" ^__^ "
                disabled = {disabled}/&gt;
            &lt;Button  onClick = {handleGameClik}&gt; Start Game  &lt;/Button&gt;
            &lt;Button&gt; Fetch Data &lt;/Button&gt;
  
            &lt;/div&gt;
            );
  };
  </code></pre>