title: Updating multiple array object values with useState in React
body: <p>Feels like I'm frustratingly close to solving this, but not sure how to update all of the values in a given object array with useState. Here's an example:</p>
  
  <pre><code>    const [data, setData] = useState([
         {key: 1,
          value: 25},
         {key: 2,
          value: 30}
          ])
  </code></pre>
  
  <p>And then assume on a button click I want to add 10 to the value of every item in the array:</p>
  
  <pre><code>    const handleClick = () =&gt; {
  
      const newData = data.map(item =&gt; item.value + 10)
  
       setData ([
           ...data, ???
  
       ])
  </code></pre>
  
  <p>newData delivers an updated array, but I'm not sure how to use the Hook to update the state. Thanks!</p>