How to do flow type annotations for React hooks (useState, etc.)? : <p>How should we be using Flow type annotations with react hooks, such as <code>useState</code>? I've tried searching for some examples of how they should be implemented, but can't find anything. </p>

<p>I tried this:</p>

<pre class="lang-js prettyprint-override"><code>const [allResultsVisible, setAllResultsVisible]: [ boolean, (boolean) =&gt; void, ] = useState(false);
</code></pre>

<p>Which doesn't throw any flow related errors, but I'm not sure if this is correct or the best way to annotate the hook. If my attempt isn't correct or the best way, what should I do instead?</p>
