Bereaksi Atribut Data Acara
const removeId = e.target.getAttribute("data-remove");
Victorious
const removeId = e.target.getAttribute("data-remove");
//To Define the Custom attribute
// start with data- Like: data-remove={someValue}
<button onClick={this.removeItem} data-remove={item.id}>Remove</button>
//To Get Custom Attribute value
// Method 1:
const removeId = e.target.dataset.remove;
// Method 2:
const removeId = e.target.getAttribute("data-remove");
// Method 3:
const removeId = e.target.attributes.getNamedItem("data-remove").value;