Shadcn Hooks

useWhyDidYouUpdate

A hook to log the props that changed in a component

Loading...

Installation

npx shadcn@latest add @shadcnhooks/use-why-did-you-update

API

/**
 * A hook to log the props that changed in a component
 * @param componentName - The name of the component
 * @param props - The props that changed in the component
 */
export function useWhyDidYouUpdate(componentName: string, props: IProps): void

Credits

Last updated on

On this page