Some useful type aliases for React events can be: The React SyntheticEvent type acts as a wrapper for all event types and can be used if strong type safety is not required. The form element itself can have events. But this approach tends to be superior when it comes to complex user interfaces and single-page applications with a myriad of views and states. ), inlining handlers is easiest as you can just use type inference and contextual typing: const el = ( <button onClick={(event) => { /* event will be correctly typed automatically! What 'type' is the event for a change handler in TypeScript? Finding features that intersect QgsRectangle but are not equal to themselves using PyQGIS. rev2022.11.3.43005. According to the HTML5 spec, developers shouldnt nest forms (it says content is flow content, but with no