UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

8 lines (7 loc) 458 B
import { Ref, type RefCallback } from 'react'; type PossibleRef<T> = Ref<T> | undefined; type RefCleanup<T> = ReturnType<RefCallback<T>>; export declare function assignRef<T>(ref: PossibleRef<T>, value: T): RefCleanup<T>; export declare function mergeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => (() => void) | undefined; export declare function useMergedRef<T>(...refs: PossibleRef<T>[]): (node: T | null) => (() => void) | undefined; export {};