Animation & Timing
useTimeoutWhen
About
Takes a callback and fires it when a condition is true
Examples
Basic usage
Arguments
| Arguments | Type | Description | Default value |
|---|---|---|---|
| callback | function | Function to be executed in timeout | undefind |
| delay | Number | Number in milliseconds after which callback is to be run | 0 |
| when | boolean | The condition which when true, sets the timeout | true |
Returned
No return value.