title: How to chain useState() method from React hook
body: <p>Is it possible to chain a React hook? If so, how?</p>
  <p>A typical application of a hook would look like this:</p>
  <pre><code>const [inv, updateInventory] = useState([])
  a = [&quot;cheese&quot;, &quot;bread&quot;, &quot;apples&quot;]
  b = a.filter(isDairy)
  updateInventory(b)
  </code></pre>
  <p>We can also do this, but it's not chained:</p>
  <pre><code>const [inv, updateInventory] = useState([])
  a =  [&quot;cheese&quot;, &quot;bread&quot;, &quot;apples&quot;]
  updateInventory(a.filter(isDairy))
  </code></pre>
  <p>What I want is a chained hook in a functional style:</p>
  <pre><code>const [inv, updateInventory] = useState([])
  a =  [&quot;cheese&quot;, &quot;bread&quot;, &quot;apples&quot;]
  a.filter(isDairy).updateInventory()
  </code></pre>
  <p>Can a hook can be modified to take state from <code>this</code>?</p>