title: Is there a way to only target one button in the React map?
body: <p><strong>I am trying to make only one button in my React map method interactive. but when I click on one of them, they both react.  I would like to target only one button.Kindly assist</strong></p>
  <pre><code>import React, { useEffect, useState } from &quot;react&quot;;
  
  function Women() {
    const [womenShoes, setWomenShoes] = useState([]);
    const [count, setCount] = useState(0);
    const [addToCart, setAddToCart] = useState(true);
  
    const addItems = () =&gt; {
      setCount(count + 1);
      setAddToCart(!addToCart);
    };
  
    useEffect(() =&gt; {
      fetch(&quot;https://pacific-leaf-twig.glitch.me/women-shoes&quot;)
        .then((response) =&gt; response.json())
        .then((data) =&gt; setWomenShoes(data));
    }, []);
  
    return (
      &lt;div className=&quot;d-flex flex-wrap justify-content-center gap-5 mt-5&quot;&gt;
        {womenShoes.map((shoe, index) =&gt; (
          &lt;div key={index} className=&quot;card mt-5&quot; style={{ width: &quot;25rem&quot; }}&gt;
            &lt;img src={shoe.img} className=&quot;card-img-top img-fluid&quot; alt=&quot;A shoe&quot; /&gt;
            &lt;div className=&quot;card-body d-flex&quot;&gt;
              &lt;div&gt;
                &lt;h5 className=&quot;card-title&quot;&gt;{shoe.name}&lt;/h5&gt;
                &lt;p className=&quot;card-text&quot;&gt;{`Items Remaining ${shoe.itemsLeft}`}&lt;/p&gt;
                &lt;button onClick={addItems} className=&quot;btn btn-primary&quot;&gt;
                  {addToCart ? &quot;Add to Cart&quot; : &quot;Remove from the Cart&quot;}
                &lt;/button&gt;
              &lt;/div&gt;
              &lt;div className=&quot;mx-auto align-self-center&quot;&gt;
                &lt;h4&gt;{`$ ${shoe.price}`}&lt;/h4&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        ))}
        &lt;div className=&quot;counter&quot;&gt;{`Items: ${count}`}&lt;/div&gt;
      &lt;/div&gt;
    );
  }
  
  export default Women;
  </code></pre>