UNPKG

@itwin/core-react

Version:

A react component library of iTwin.js UI general purpose components

22 lines (21 loc) 554 B
/** @packageDocumentation * @module Utilities */ import * as React from "react"; /** Hook used to store an HTMLElement in state by using ref callback returned from hook. * *Example:* * ``` tsx * const [divElementRef, divElement] = useRefState<HTMLDivElement>(); * const ownerDoc = divElement?.ownerDocument ?? document; * * return ( * <div ref={divElementRef} > * .... * </div> * ); * ``` * } * @internal */ export declare function useRefState<T>(): [React.Ref<T>, T | undefined]; //# sourceMappingURL=useRefState.d.ts.map