@supunlakmal/hooks
Version:
A collection of reusable React hooks
9 lines (8 loc) • 395 B
TypeScript
import { type DependencyList } from 'react';
/**
* This hook provides a console log when the component mounts, updates and unmounts.
*
* @param componentName Provides the name of the component in which the life cycle is being logged
* @param deps Dependencies list, as for `useEffect` hook
*/
export declare const useLifecycleLogger: (componentName: string, deps?: DependencyList) => void;