1.2.1 • Published 5 years ago

@flaque/use-timeout v1.2.1

Weekly downloads
5
License
UNLICENSED
Repository
github
Last release
5 years ago

use-timeout

License

A react-hook for accessing setTimeout without constantly resetting.

Install

yarn add @flaque/use-timeout

Usage

const [setTimeoutHook, clearTimeoutHook] = useTimeout();

setTimeoutHook(() => {
  console.log("It's been 10000 miliseconds!");
}, 10000);

// ...

clearTimeoutHook(); // Stops the timeout before it happens
1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago