title: React: How to update object in array map
body: <p>I'm trying to update the value of an array when a button is clicked. But I can't figure out how to do so using <code>this.setState</code>.</p>
  
  <pre><code>export default class App extends React.Component {
    state = {
      counters: [{ name: "item1", value: 0 }, { name: "item2", value: 5 }]
    };
    render() {
      return this.state.counters.map((counter, i) =&gt; {
        return (
          &lt;div&gt;
            {counter.name}, {counter.value}
            &lt;button onClick={/* increment counter.value here */}&gt;+&lt;/button&gt;
          &lt;/div&gt;
        );
      });
    }
  }
  </code></pre>
  
  <p>How do I increment <code>counter.value</code> when the button is clicked?</p>