@supunlakmal/hooks
Version:
A collection of reusable React hooks
10 lines (9 loc) • 440 B
TypeScript
/**
* Custom hook for logging component lifecycle events (mount, update, unmount)
* and prop changes during development.
* Logs are only output when `process.env.NODE_ENV` is 'development'.
*
* @param componentName - The name of the component to include in the logs.
* @param props - The current props of the component (optional, for logging changes).
*/
export declare const useLogger: (componentName: string, props?: any) => void;