JSPM

@hooks/timeout

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q8993F
    • License MIT

    React hook to delay function execution

    Package Exports

    • @hooks/timeout

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hooks/timeout) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    🎒 @hooks/timeout

    React hook to delay function execution

    NPM version Travis License

    Install

    npm i @hooks/timeout

    Usage

    useTimeout

    useTimeout(callback: Function, delay?: number): void

    Parameters

    callback: Function

    Will be executed when the delay elapses.

    delay?: number

    Length of time in milliseconds before the callback is executed. Providing null will clear the timeout.