Unexpected use of 'event' no-restricted-globals when using event.target.id to get id from bind(this)
This code works on Codepen: See https://codepen.io/pkshreeman/pen/YQNPKB?editors=0010 However I am trying to use this in my own 'create-react-app' and the error of 'no-restricted-globals' is trigged by event.target.id . What is a workaround for this. How do you get id from 'this' in react other than using the event target? const Elem = (props) =>{ return (<div> <h1 onClick={props.clickon} id="GM"> Good Morning! <br/> {props.name} {props.last} <br /> This is phase three</h1> <button id="btn1" onClick={props.clickon}> {props.text} </button> <button id="btn2" onClick={props.clickon}> Second