1//To Define the Custom attribute
2// start with data- Like: data-remove={someValue}
3<button onClick={this.removeItem} data-remove={item.id}>Remove</button>
4
5//To Get Custom Attribute value
6// Method 1:
7const removeId = e.target.dataset.remove;
8// Method 2:
9const removeId = e.target.getAttribute("data-remove");
10// Method 3:
11const removeId = e.target.attributes.getNamedItem("data-remove").value;