UNPKG

@nex-ui/hooks

Version:

A collection of React Hooks for Nex UI components.

11 lines (9 loc) 366 B
/** * A custom React hook that returns a stable function reference. * This is useful to avoid unnecessary re-renders when passing functions as props. * * @param fn - The function to wrap. * @returns A stable function reference that always points to the latest version of `fn`. */ declare const useEvent: <T extends Function>(fn: T) => T; export { useEvent };