OneBite.Dev - Coding blog in a bite size

What is type for onClick event in reactJS using typescript

What is the correct type when using onClick event in reactJS using typescript

What is the correct type when using onClick event in reactJS using typescript?

Right now, I have two possibilites:

function handleClick(event: React.MouseEvent<Element>){
..
}

or

function handleClick(event: React.MouseEvent<HTMLElement>){
..
}

react typescript