use-timeout
Calls function in given timeout
Source
Docs
Package
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
UseTimeoutOptions and UseTimeoutReturnValue types are exported from @mantine/hooks package,
you can import them in your application: