UNPKG

@winglet/react-utils

Version:

React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality

8 lines (7 loc) 406 B
/** * Returns a memoized function that always uses the latest version of the handler. * This prevents stale closure issues while maintaining referential stability. * @param handler - The function to be memoized * @returns A memoized function that calls the latest version of the handler */ export declare const useHandle: <P extends Array<any>, R>(handler?: (...args: P) => R) => ((...args: P) => R);