const handleIncrement = id => {
const elementIndex = counters.findIndex(counter => counter.id === id);
const newCounter = [...counters];
newCounter[elementIndex].value++;
setCounters(newCounter);
}; const {value} = props; Можно указать id. const handleIncrement = () => {
props.onIncrement(props.id);
};