Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 403 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 403 Bytes

useTimeout

A hook that allows you to set a timeout.

Usage

import { useTimeout } from 'hamo'

function App() {
  useTimeout(() => {
    console.log('timeout')
  }, 5000)
}

Parameters

  • 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.