Skip to content

useLastChanged ​

Category
Time

Hook for records the timestamp of the last change

typescript
import { useLastChanged } from '@siberiacancode/reactuse';

Usage ​

typescript
const lastChanged = useLastChanged(source);

Demo ​

Api ​

Parameters

NameTypeDefaultNote
sourceany-The source of the last change
options.initialValue?number | nullnullThe initial value

Contributors ​

Source • Demo