#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
5 min read
Question 24 of 48hard

useImperativeHandle 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