79145983

Date: 2024-10-31 18:51:12
Score: 0.5
Natty:
Report link

HTMLElement is the type of the dom element. You are using that type for a parameter of a callback for an event coming from the dom element. Those aren't the same thing.

Try:

const handleOnClick = useCallback((ev: React.MouseEvent<HTMLElement>) => {
  console.log(ev.currentTarget);
}, []);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): is the
Posted by: Abraham Labkovsky