useLastChanged ​
Hook for records the timestamp of the last change
time
test coverage
Last changed: last month
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