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 2.2.2 to 2.2.3

7

CHANGELOG.md

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

### [2.2.3](https://github.com/EricLambrecht/react-timing-hooks/compare/v2.2.2...v2.2.3) (2022-02-19)
### Bug Fixes
* Fix infinite render loop in paused useAnimationFrameLoop ([bda5715](https://github.com/EricLambrecht/react-timing-hooks/commit/bda5715668c8cc880eccc9a56b6b68d99bfc9cf8)), closes [#25](https://github.com/EricLambrecht/react-timing-hooks/issues/25)
### [2.2.2](https://github.com/EricLambrecht/react-timing-hooks/compare/v2.2.1...v2.2.2) (2022-01-22)

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

8

dist/index.es.js

@@ -159,9 +159,11 @@ import { useRef, useCallback, useEffect, useState } from 'react';

rafCallback.current();
runInLoop();
}
runInLoop();
}, []);
const runInLoop = useAnimationFrame(nextCallback);
useEffect(() => {
runInLoop();
}, [runInLoop]);
if (!pause) {
runInLoop();
}
}, [runInLoop, pause]);
};

@@ -168,0 +170,0 @@

@@ -163,9 +163,11 @@ 'use strict';

rafCallback.current();
runInLoop();
}
runInLoop();
}, []);
const runInLoop = useAnimationFrame(nextCallback);
react.useEffect(() => {
runInLoop();
}, [runInLoop]);
if (!pause) {
runInLoop();
}
}, [runInLoop, pause]);
};

@@ -172,0 +174,0 @@

{
"name": "react-timing-hooks",
"version": "2.2.2",
"version": "2.2.3",
"description": "React hooks for setTimeout, setInterval, requestAnimationFrame, requestIdleCallback",

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

"devDependencies": {
"@shopify/jest-dom-mocks": "^2.9.1",
"@testing-library/react": "^11.0.4",
"@testing-library/react-hooks": "^3.4.1",
"@shopify/jest-dom-mocks": "^3.0.13",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^4.0.1",
"@testing-library/user-event": "^14.0.0-beta",
"@types/jest": "^26.0.14",

@@ -57,4 +58,4 @@ "@types/node": "^13.13.21",

"emoji-cz": "^0.3.1",
"jest": "^26.4.2",
"node-fetch": "^2.6.1",
"jest": "^27.5.1",
"node-fetch": "^2.6.7",
"prettier": "^2.1.2",

@@ -69,3 +70,3 @@ "react": "^17.0.2",

"standard-version": "^9.0.0",
"ts-jest": "^26.4.0",
"ts-jest": "^27.1.3",
"typescript": "^4.0.3"

@@ -72,0 +73,0 @@ },

@@ -0,0 +0,0 @@ [![npm](https://flat.badgen.net/npm/v/react-timing-hooks)](https://www.npmjs.com/package/react-timing-hooks)

Sorry, the diff of this file is not supported yet

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