This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2025-01-11 09:54:09 +03:00

16 lines
483 B
TypeScript

import * as React from 'react';
type PossibleRef<T> = React.Ref<T> | undefined;
/**
* A utility to compose multiple refs together
* Accepts callback refs and RefObject(s)
*/
declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
/**
* A custom hook that composes multiple refs
* Accepts callback refs and RefObject(s)
*/
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
export { composeRefs, useComposedRefs };