What is useImperativeHandle and should you use it?
Answer
•Allows customizing the ref API.
•Useful for controls (focus, reset).
•This is an imperative approach, use rarely.
•Prefer declarative props.
•If used — document the methods.
Was this answer helpful?