UNPKG

reactuals

Version:

A useful package providing a collection of 50+ React hooks and utilities to simplify React development.

11 lines (10 loc) 308 B
/** * Logs why a component re-rendered by comparing props. * * @param name - Component name (for logs) * @param props - Props to track * * Example: * useWhyDidYouUpdate("MyComponent", props); */ export declare function useWhyDidYouUpdate<T extends Record<string, any>>(name: string, props: T): void;