title: Why does TypeError occur in react hooks
body: <pre><code>const FindEmail = () =&gt; {
  const {userEmail, setUserEmail} = useState('');
  
      const onChangeEmail = (e) =&gt; {
          setUserEmail(e.target.value);
      }; 
      return (
        &lt;Input className=&quot;inputEmail&quot; value={userEmail} onChange={onChangeEmail}&gt;
        );
      };
  </code></pre>
  <p>TypeError: setUserEmail is not a function when data is entered into input from these codes
  How can I solve the problem?
  *Input starts with a capital letter because i am using reactstrap</p>