title: how to update multiple state at once using react hook react.js
body: <p>I would like to know if I can use setState hook multiple times in same function.
  For example, like this</p>
  
  <pre><code>import React, { useEffect, useState } from 'react';
  
  function(props) {
  const [color, setColor] = useState(0)
  const [size, setSize]= useState(0)
  const [weight, setWeight] = useState(0)
  
  const onClickRandomButton = () =&gt; {
      setColor(Math.random() * 10)
      setSize(Math.random() * 10)
      setWeight(Math.random() * 10)
  }
  
  return &lt;div&gt;
    &lt;button onClick = {onClickRandomButton}&gt;random&lt;/button&gt;
  &lt;/div&gt;
  
  }
  </code></pre>
  
  <p>I have tested, but it doesn't work as expected.
  To set multiple values at once using hook, how should I do?
  Thanks</p>