UNPKG

@supunlakmal/hooks

Version:

A collection of reusable React hooks

16 lines (15 loc) 583 B
interface Props { [key: string]: any; } /** * Hook for debugging component re-renders in React. * Logs the props that changed between renders, helping identify performance bottlenecks. * * Usage: Call this hook within your component, passing the component name and its props. * useWhyDidYouUpdate('MyComponent', props); * * @param componentName The name of the component being debugged (for logging purposes). * @param props The current props object of the component. */ export declare const useWhyDidYouUpdate: (componentName: string, props: Props) => void; export {};