use-timeout
Calls function in given timeout
Source
Docs
PackageIcon
Usage
Random value:
API
Arguments:
callback– function that will be called after the timer elapsesdelay– number of milliseconds the timer should wait before the specified function is executedoptions: { autoInvoke }– determines whether the timer should be started on mount; defaults to false
Return object:
start– starts the timerclear– cancels the timer
Definition
Exported types
The UseTimeoutOptions and UseTimeoutReturnValue types are exported from @mantine/hooks;