title: Cannot find name 'setTask' typescript from js code React
body: <p>I am trying to test a form in a basic react web app but I am getting the errors</p>
  <ol>
  <li>Cannot find name 'setTask'  on the line 5.</li>
  <li>On Line 7, Parameter 'e' implicitly has an 'any' type.ts(7006)</li>
  </ol>
  <p>please help m ewith this, here is the code below:</p>
  <pre><code>import React, {useState} from 'react';
  //importing libararies
  import { PlusIcon } from '@heroicons/react/24/solid'
  const CusotmForm = () =&gt; {
      cosnt [task, setTask] = useState({});
  //prevents default when you submit and refresh
    const handleFormSubmit = (e) =&gt;{
      e.preventDefault();
      console.log(e);
    }
    return (
      &lt;form 
      className=&quot;todo&quot;
      onSubmit={handleFormSubmit}
      &gt;
        
       &lt;div className=&quot;wrapper&quot;&gt;
         &lt;input 
         type=&quot;text&quot; 
         id=&quot;task&quot;
         className=&quot;input&quot;
         value={task}
         onInput={(e)} =&gt;setTask(e.target.value)
         required
         autoFocus
         maxLength={60}
         placeholder=&quot;Enter Task&quot;
         /&gt;
         &lt;label htmlFor=&quot;task&quot;
         className=&quot;label&quot;
         &gt;Enter Task&lt;/label&gt;
          &lt;/div&gt;   
          &lt;button
          className=&quot;btn&quot;
          aria-label=&quot;Add task&quot;
          type = &quot;submit&quot;
          &gt;
          &lt;PlusIcon /&gt;
          &lt;/button&gt;
      &lt;/form&gt;
    )
  }//need to install npm install @heroicons/react
  
  export default CusotmForm
  </code></pre>