Start here. This is the direct spoken answer to practice first.
Overview
An imperative handle is an escape hatch for narrow actions that are awkward to express as renderable state.
I expose an imperative handle only for focused actions such as focus, scrollIntoView, or media control. In React 19 a component can receive ref as a prop and use useImperativeHandle to expose a small object instead of the entire internal DOM node. If behavior can be expressed through props and state, I prefer that declarative API.