useLastChanged ​
Hook for records the timestamp of the last change
utilities
low
test coverage
Last changed: 2 months ago
Installation ​
Library
CLI
Manual
typescript
import { useLastChanged } from '@siberiacancode/reactuse';Usage ​
typescript
const lastChanged = useLastChanged(source);Demo ​
Api ​
Parameters
| Name | Type | Default | Note |
|---|---|---|---|
| source | any | - | The source of the last change |
| options.initialValue? | number | null | null | The initial value |
Returns
number | null
Type declaration ​
typescript
export interface UseLastChangedOptions {
initialValue?: number;
}Source ​
Source • DemoContributors ​
D
V