useRefObjectAsForwardedRef

Uses a ref object as the imperative handle for a forwarded ref.

This can be used to synchronize the ref object with the forwarded ref and allow local access the reference instance with .current.

The refObject should be passed to the underlying element, NOT the forwardedRef.

Example

This div has a light blue outline when the ref is set

API

Loading data for useRefObjectAsForwardedRef...