Needs Puma Managers

    rescript-throttle-react

    1.0.1 • Public • Published

    rescript-throttle-react

    version license build

    Throttle hooks for @rescript/react.

    ShakaCode

    If you are looking for help with the development and optimization of your project, ShakaCode can help you to take the reliability and performance of your app to the next level.

    If you are a developer interested in working on ReScript / TypeScript / Rust / Ruby on Rails projects, we're hiring!

    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

    4

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.05 kB

    Total Files

    5

    Last publish

    Collaborators

    • alex.fedoseev