useLifecycleLogger
Log messages for different lifecycles of a component with additional data.
The useLifecycleLogger
hook is helpful when you want to log a message during component lifecycle like mount, unmount and update with any additioanl data.
useLifecycleLogger
Count: 0
Usage
Import the hook from @abhushanaj/react-hooks
and use in required component.
API Reference
Parameters
Parameter | Type | Description | Default |
---|---|---|---|
name | string | Name for the component. | N/A |
data | Record<string | number, unknown> (optional) | Any additional data you want to log. | {} |