I am making a chat application and i saw that whatsapp doesn't allow the use of space bar when there is no input yet, i did try to find it out in stack overflow itself but they gave the answer which worked only there, but when i tried in my react-app it showed this error:
Unexpected use of 'event' no-restricted-globals
I am confused what to do, i got this at the first time:
Then i went to the file and tried commenting the line(not sure if can), but that too didn't work for me. Like is there any other way i can achieve the same functionality without the use event

{}button to mark blocks of code, or indent with four spaces for the same effect. The contents of a screenshot can’t be searched, run as code, or copied and edited to create a solution.var e = window.eventstuff, just use it as-is.keydown={e => keyhandler(e)}try using this way.x => f(x)is almost always pointless in that context wherefdoes the job.