@dxos/react-ui
    Preparing search index...

    Variable useForwardedRefConst

    useForwardedRef: <T>(forwardedRef: ForwardedRef<T>) => RefObject

    Combines a possibly undefined forwarded ref with a locally defined ref. Returns a stable ref object that synchronizes with the forwarded ref.

    Best practice: This hook creates a stable local ref and synchronizes it with the forwarded ref. The returned ref object is stable across renders, preventing infinite loops caused by ref identity changes.

    NOTE: This pattern doesn't update refs once they are set. If this is required, use useMergeRefs.

    Type declaration

      • <T>(forwardedRef: ForwardedRef<T>): RefObject
      • Type Parameters

        • T

        Parameters

        • forwardedRef: ForwardedRef<T>

        Returns RefObject