access react element data attribute code example
Example: react get data attribute from element
<div data-id={someId} >Test</div>
const id = e.target.getAttribute("data-id");
//alternate to getAttribute
const id = e.target.attributes.getNamedItem("data-id").value;