A hook that allows you to set a timeout.
import { useTimeout } from 'hamo'
function App() {
useTimeout(() => {
console.log('timeout')
}, 5000)
}
callback
: The callback function to be executed after the delay.delay
: The delay (in milliseconds) before the callback function is executed.deps
: The dependencies array for the hook.