Jak uzyskać klucz z przycisku w React
const functionCall = (event) => {
console.log(event.target.getAttribute('a-key'));
}
<button a-key={1} onClick={functionCall}>Press Me</button>
Terrible Thrush