https://github.com/damiangreen/use-trace-update
A hook to trace updates to React function components
https://github.com/damiangreen/use-trace-update
Last synced: about 1 year ago
JSON representation
A hook to trace updates to React function components
- Host: GitHub
- URL: https://github.com/damiangreen/use-trace-update
- Owner: damiangreen
- License: mit
- Created: 2019-03-24T11:22:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T21:19:56.000Z (about 2 years ago)
- Last Synced: 2025-04-28T21:08:16.029Z (about 1 year ago)
- Language: TypeScript
- Size: 407 KB
- Stars: 32
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# useTraceUpdate
A hook to trace updates to React function components
`useTraceUpdate` is a React Hook that logs to the console prop changes.
## Install
- `npm install use-trace-update` or
- `yarn add use-trace-update`
## Use
```JavaScript
import useTraceUpdate from 'use-trace-update';
const MyButton = (props: AllProps) => {
useTraceUpdate(props)
return ;
};
```