Please continue reading below to see how to use it or read my guide on using React's events with TypeScript.
interface FocusEvent<T = Element> extends SyntheticEvent<T, NativeFocusEvent> {
relatedTarget: EventTarget | null;
target: EventTarget & T;
}
import React, { FocusEvent } from 'react';
const InputComponent = () => {
const handleFocusEvent = (e: FocusEvent<HTMLInputElement>) => {
// Do something
};
return <input value="Some text" onBlurCapture={handleFocusEvent} />;
};
export default InputComponent;