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

react-timing-hooks

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timing-hooks - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [3.1.0](https://github.com/EricLambrecht/react-timing-hooks/compare/v3.0.0...v3.1.0) (2022-12-09)
### Features
* **timeout:** Allow manual clearance of timeouts ([8a589b8](https://github.com/EricLambrecht/react-timing-hooks/commit/8a589b8ec78eb7fb9f536289993471171d353322)), closes [#28](https://github.com/EricLambrecht/react-timing-hooks/issues/28)
## [3.0.0](https://github.com/EricLambrecht/react-timing-hooks/compare/v2.2.3...v3.0.0) (2022-12-09)

@@ -7,0 +14,0 @@

2

dist/index.es.js

@@ -8,2 +8,3 @@ import { useRef, useCallback, useEffect, useState } from 'react';

timeoutIds.current.push(id);
return id;
}, [timeoutIds]);

@@ -50,2 +51,3 @@ useEffect(() => {

setTimeoutId(id);
return id;
}, [timeout]);

@@ -52,0 +54,0 @@ }

@@ -12,2 +12,3 @@ 'use strict';

timeoutIds.current.push(id);
return id;
}, [timeoutIds]);

@@ -54,2 +55,3 @@ react.useEffect(() => {

setTimeoutId(id);
return id;
}, [timeout]);

@@ -56,0 +58,0 @@ }

3

dist/timeout/useTimeout.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
/**

@@ -5,3 +6,3 @@ * @param callback The callback that is invoked after the timeout expired

*/
declare function useTimeout<T extends (...args: never[]) => unknown>(callback: T, timeout: number): (...args: Parameters<T>) => void;
declare function useTimeout<T extends (...args: never[]) => unknown>(callback: T, timeout: number): (...args: Parameters<T>) => NodeJS.Timeout | number;
export default useTimeout;
{
"name": "react-timing-hooks",
"version": "3.0.0",
"version": "3.1.0",
"description": "React hooks for setTimeout, setInterval, requestAnimationFrame, requestIdleCallback",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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