5 min read
•Question 24 of 48harduseImperativeHandle Hook
Customizing ref exposed to parent.
What is useImperativeHandle?
useImperativeHandle customizes the instance value exposed to parent components when using ref. Use with forwardRef.
When to Use
- Exposing specific methods to parent
- Creating controlled imperative APIs
- Building reusable component libraries