Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 246 Bytes

useTimeout.md

File metadata and controls

15 lines (10 loc) · 246 Bytes

useTimeout

Returns true after a specified number of milliseconds.

Usage

import { useTimeout } from 'react-use';

const Demo = () => {
  const ready = useTimeout(2000);

  return <div>Ready: {ready ? 'Yes' : 'No'}</div>;
};