rescript-throttle-react

    1.0.0 • Public • Published

    rescript-throttle-react

    version license build

    Throttle hooks for @rescript/react.

    Installation

    # yarn
    yarn add rescript-throttle-react
    # or npm
    npm install --save rescript-throttle-react

    Then add it to bsconfig.json:

    "bs-dependencies": [
      "rescript-throttle-react"
    ]

    Usage

    // With default timeout (100ms)
    let fn = ReactThrottle.useThrottled(fn)
    
    // With configured timeout
    let fn = ReactThrottle.useThrottled(~wait=250, fn)
    
    // Controlled hook
    let fn = ReactThrottle.useControlled(fn)

    See rescript-throttle for more details.

    License

    MIT.

    Install

    npm i rescript-throttle-react

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.06 kB

    Total Files

    6

    Last publish

    Collaborators

    • alex.fedoseev