Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-hook/throttle

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hook/throttle - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "@react-hook/throttle",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/jaredLunde/react-hook/tree/master/packages/throttle#readme",

@@ -5,0 +5,0 @@ "repository": "github:jaredLunde/react-hook",

@@ -49,3 +49,3 @@ <hr>

```
```ts
export const useThrottle = <State>(

@@ -61,7 +61,7 @@ initialState: State | (() => State),

#### Options
#### Arguments
| Property | Type | Default | Description |
| ------------ | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| initialState | `any` | | The initial state stored in `useState` |
| initialState | `State` | | The initial state stored in `useState` |
| fps | `number` | `30` | Defines the rate in frames per second with which `setState` is invoked with new state |

@@ -74,3 +74,3 @@ | leading | `boolean` | `false` | Calls `setState` on the leading edge (right away). When `false`, `setState` will not be called until the next frame is due |

| -------- | --------------------------------- | ------------------------------------------------- |
| state | `any` | The value set by `setState` or the `initialState` |
| state | `State` | The value set by `setState` or the `initialState` |
| setState | `Dispatch<SetStateAction<State>>` | A throttled `setState` callback |

@@ -90,3 +90,3 @@

#### Options
#### Arguments

@@ -93,0 +93,0 @@ | Property | Type | Default | Description |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc