React Hooks in TypeScript

added by JavaScript Kicks
2/13/2019 8:41:51 AM

364 Views

useImperativeHandle useImperativeHandle is by far the most involved Hook to set types for, but also likely the least used as it is not a common (or recommended) practice to expose imperative functions (handles) on components. The above example wraps an HTML input component and exposes a focus function in order to allow the input to be focussed.


0 comments