@react-hook/throttle
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"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 | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13278