UNPKG

@storm-stack/hooks

Version:

A collection of React hooks used by Storm Software in various client libraries and applications.

6 lines (5 loc) 276 B
/** * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a * prop or avoid re-executing effects when passed as a dependency */ export declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;