WarningThis hook should only be used during development. It performs shallow comparisons on every render, which can impact performance if left in production code.
NoteTo see changes in the console, ensure you pass an object where keys represent the prop or state names you wish to track.
A development-only debugging utility. When a component re-renders, this hook compares the current values of a provided object (usually props or state) against the previous values and logs exactly what changed to the console.
| Name | Type | Description |
|---|---|---|
| value | Record<string, unknown> | An object containing the props or state variables to track. Required. |
| name | string | A label to identify the component in console logs. Default: 'Component'. |