I am trying to use e.target.name in react to set the state as I have done before, however e.target.name seems to be undefined for some reason and I can\'t figure out why, if
name is an attribute and needs function getAttribute(...) to be fetched. As @Ele has pointed out, the suggested solution would be
name
getAttribute(...)
var name = e.target.getAttribute('name'); //'HOME'