Docs
useTimeout
Run a callback function after a specified delay with useTimeout, supporting dynamic updates and cleanup on unmount.
Installation
Usage
API Reference
Parameters
Name | Type | Description |
---|---|---|
callback | () => void | The function to be executed when the timeout elapses. |
delay | null | number | The duration (in milliseconds) for the timeout. Set to null to clear the timeout. |
Returns
void