react-use
Version:
Collection of React Hooks
4 lines (3 loc) • 393 B
TypeScript
import { ForwardRefExoticComponent, MutableRefObject, PropsWithoutRef, RefAttributes, RefForwardingComponent } from 'react';
export default function useEnsuredForwardedRef<T>(forwardedRef: MutableRefObject<T>): MutableRefObject<T>;
export declare function ensuredForwardRef<T, P = {}>(Component: RefForwardingComponent<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;