score:1

Accepted answer
const handleClickVote = () => {
    return setPoints(current => Object.assign([], current, {
      [selected]: current[selected] + 1
    }));
}

score:1

copy[selected] += 1;
return setPoints(copy);

Related Query

More Query from same tag