Property 'nodeName' does not exist on type 'EventTarget'.ts(2339) code example
Example: property 'name' does not exist on type 'eventtarget' react
// If you have to use event.target itself, you would have to cast the object:
const { name } = event.target as HTMLButtonElement;