title: can't use useState with typescript (Cannot find name 'useState')
body: <p>What is the problem with below code? I got warning by typescript when use useState</p>
  
  <pre><code>import * as React, { useState } from 'react'
  
  const useForm = (callback: any | undefined) =&gt; {
    const [inputs, setInputs] = useState({}) //error: Cannot find name 'useState'.ts(2304)
  
  
    const handleInputChange = event =&gt; {
      event.persist()
      setInputs(inputs =&gt; ({
        ...inputs,
        [event.target.name]: event.target.value,
      }))
    }
  
    return {
      handleInputChange,
      inputs,
    }
  }
  
  export default useForm
  </code></pre>
  
  <p><a href="https://codesandbox.io/s/react-typescript-starter-lmub8" rel="noreferrer">https://codesandbox.io/s/react-typescript-starter-lmub8</a></p>