@matthew.ngo/reform
Version:
A flexible and powerful React form management library with advanced validation, state observation, and multi-group support
12 lines (11 loc) • 499 B
TypeScript
/// <reference types="react" />
/**
* Hook to create a memoized callback that maintains reference equality
* even when dependencies change, but only updates the function when
* the result would be different.
*
* @param callback - The callback function to memoize
* @param deps - Dependencies array for the callback
* @returns Memoized callback function
*/
export declare function useMemoizedCallback<T extends (...args: any[]) => any>(callback: T, deps: React.DependencyList): T;