title: Type for the setState function of the useState hook?
body: <p>I'm converting my React project to Typescript.</p>
  <p>I have this piece of state:</p>
  <p><strong>AdminBlogPostContainer.tsx</strong></p>
  <pre><code>const [blogPost,setBlogPost] = useState&lt;null | BLOGPOST&gt;(null);
  
  return(
    &lt;AdminBlogPostPage
      blogPost={blogPost as BLOGPOST}
      setBlogPost={setBlogPost}
    /&gt;
  );
  </code></pre>
  <p><strong>AdminBlogPostPage.tsx</strong></p>
  <pre><code>interface AdminBlogPostPage {
    blogPost: BLOGPOST,
    setBlogPost:            // &lt;---- WHAT SHOULD I USE AS TYPE HERE ?
  }
  
  const AdminBlogPostPage: React.FC&lt;AdminBlogPostPage&gt; = (props) =&gt; {
    console.log(&quot;Rendering AdminBlogPostPage...&quot;);
  
    return(
      // ...
    );
  };
  
  export default AdminBlogPostPage;
  </code></pre>
  <p>This is the error message:</p>
  <p><a href="https://i.stack.imgur.com/vCIse.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vCIse.png" alt="enter image description here" /></a></p>