@fluentui/react-component-ref
Version:
A set of components and utils to deal with React refs.
11 lines (10 loc) • 419 B
TypeScript
import * as React from 'react';
/**
* The function that correctly handles passing refs.
*
* @param ref - An ref object or function
* @param node - A node that should be passed by ref
*/
export declare const handleRef: <N>(ref: React.Ref<N> | undefined, node: N) => void;
/** Checks that the passed object is a valid React ref object. */
export declare const isRefObject: (ref: any) => ref is React.RefObject<any>;