2024-06-15 00:55:43 +03:00

14 lines
401 B
TypeScript

/**
* Part of this code is taken from @chakra-ui/system ❤️
*/
/**
* React hook to persist any value between renders,
* but keeps it up-to-date if it changes.
*
* @param fn the function to persist
* @param deps the function dependency list
*/
declare function useCallbackRef<T extends (...args: any[]) => any>(fn: T | undefined, deps?: React.DependencyList): T;
export { useCallbackRef };