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

@restart/hooks

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version 0.4.14 to 0.4.15

6

cjs/useDebouncedState.d.ts

@@ -5,3 +5,5 @@ import { Dispatch, SetStateAction } from 'react';

* Similar to `useState`, except the setter function is debounced by
* the specified delay.
* the specified delay. Unlike `useState`, the returned setter is not "pure" having
* the side effect of scheduling an update in a timeout, which makes it unsafe to call
* inside of the component render phase.
*

@@ -17,2 +19,2 @@ * ```ts

*/
export default function useDebouncedState<T>(initialState: T, delayOrOptions: number | UseDebouncedCallbackOptions): [T, Dispatch<SetStateAction<T>>];
export default function useDebouncedState<T>(initialState: T | (() => T), delayOrOptions: number | UseDebouncedCallbackOptions): [T, Dispatch<SetStateAction<T>>];

@@ -10,3 +10,5 @@ "use strict";

* Similar to `useState`, except the setter function is debounced by
* the specified delay.
* the specified delay. Unlike `useState`, the returned setter is not "pure" having
* the side effect of scheduling an update in a timeout, which makes it unsafe to call
* inside of the component render phase.
*

@@ -13,0 +15,0 @@ * ```ts

@@ -5,3 +5,5 @@ import { Dispatch, SetStateAction } from 'react';

* Similar to `useState`, except the setter function is debounced by
* the specified delay.
* the specified delay. Unlike `useState`, the returned setter is not "pure" having
* the side effect of scheduling an update in a timeout, which makes it unsafe to call
* inside of the component render phase.
*

@@ -17,2 +19,2 @@ * ```ts

*/
export default function useDebouncedState<T>(initialState: T, delayOrOptions: number | UseDebouncedCallbackOptions): [T, Dispatch<SetStateAction<T>>];
export default function useDebouncedState<T>(initialState: T | (() => T), delayOrOptions: number | UseDebouncedCallbackOptions): [T, Dispatch<SetStateAction<T>>];

@@ -6,3 +6,5 @@ import { useState } from 'react';

* Similar to `useState`, except the setter function is debounced by
* the specified delay.
* the specified delay. Unlike `useState`, the returned setter is not "pure" having
* the side effect of scheduling an update in a timeout, which makes it unsafe to call
* inside of the component render phase.
*

@@ -9,0 +11,0 @@ * ```ts

{
"name": "@restart/hooks",
"version": "0.4.14",
"version": "0.4.15",
"main": "cjs/index.js",

@@ -5,0 +5,0 @@ "types": "cjs/index.d.ts",

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