useLastChanged ​
Hook for records the timestamp of the last change
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 |