Property 'name' does not exist on type 'EventTarget react code example
Example 1: 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;
Example 2: Property 'value' does not exist on type 'EventTarget & Element'.
(e.target as HTMLButtonElement).value