UNPKG

@primer/components

Version:
11 lines (10 loc) 574 B
import { ForwardedRef } from 'react'; /** * Creates a ref by combining multiple constituent refs. The ref returned by this hook * should be passed as the ref for the element that needs to be shared. This is * particularly useful when you are using `React.forwardRef` in your component but you * also want to be able to access the local element. This is a small anti-pattern, * though, as it breaks encapsulation. * @param refs */ export declare function useCombinedRefs<T>(...refs: (ForwardedRef<T> | null | undefined)[]): import("react").MutableRefObject<T | null>;