how to use getattribute in react code example
Example 1: react data attributes event
const removeId = e.target.getAttribute("data-remove");
Example 2: 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;