@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) • 311 B
TypeScript
import { type EffectCallback } from 'react';
/**
* Executes a handler function only once when the component mounts.
* Equivalent to useEffect with an empty dependency array.
* @param handler - The function to execute on component mount
*/
export declare const useOnMount: (handler: EffectCallback) => void;