Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
jbilcke-hf
/
observer
like
10
Paused
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
observer
/
src
/
lib
/
useTimeout.ts
Julian Bilcke
fixed some issues
1896b82
over 2 years ago
raw
Copy download link
history
blame
contribute
delete
Safe
191 Bytes
import
{ useEffect }
from
"react"
export
function
useTimeout
(
duration:
number
, callback: () =>
void
) {
useEffect
(
() =>
{
setTimeout
(
() =>
{
callback
()
}, duration)
}, [])
}