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

@restart/hooks

Package Overview
Dependencies
Maintainers
2
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.3.13 to 0.3.14

cjs/useStateAsync.d.ts

2

cjs/useAnimationFrame.d.ts

@@ -18,3 +18,3 @@ export interface UseAnimationFrameReturn {

*
* ```tsx
* ```ts
* const [style, setStyle] = useState({});

@@ -21,0 +21,0 @@ * const animationFrame = useAnimationFrame();

@@ -8,4 +8,2 @@ "use strict";

var _useWillUnmount = _interopRequireDefault(require("./useWillUnmount"));
var _useMounted = _interopRequireDefault(require("./useMounted"));

@@ -15,2 +13,4 @@

var _useWillUnmount = _interopRequireDefault(require("./useWillUnmount"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -22,3 +22,3 @@

*
* ```tsx
* ```ts
* const [style, setStyle] = useState({});

@@ -25,0 +25,0 @@ * const animationFrame = useAnimationFrame();

@@ -30,3 +30,3 @@ "use strict";

var updater = function updater(update) {
var updater = (0, _react.useCallback)(function (update) {
if (update === null) return;

@@ -44,5 +44,4 @@

}
};
}, [setState]);
return [state, updater];
}

@@ -18,3 +18,3 @@ export interface UseAnimationFrameReturn {

*
* ```tsx
* ```ts
* const [style, setStyle] = useState({});

@@ -21,0 +21,0 @@ * const animationFrame = useAnimationFrame();

import { useRef } from 'react';
import useWillUnmount from './useWillUnmount';
import useMounted from './useMounted';
import useStableMemo from './useStableMemo';
import useWillUnmount from './useWillUnmount';

@@ -10,3 +10,3 @@ /**

*
* ```tsx
* ```ts
* const [style, setStyle] = useState({});

@@ -13,0 +13,0 @@ * const animationFrame = useAnimationFrame();

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import { useState } from 'react';
import { useCallback, useState } from 'react';

@@ -25,3 +25,3 @@ /**

var updater = function updater(update) {
var updater = useCallback(function (update) {
if (update === null) return;

@@ -39,5 +39,4 @@

}
};
}, [setState]);
return [state, updater];
}
{
"name": "@restart/hooks",
"version": "0.3.13",
"version": "0.3.14",
"main": "cjs/index.js",

@@ -18,3 +18,3 @@ "types": "cjs/index.d.ts",

"preset": "@4c",
"setupFiles": [
"setupFilesAfterEnv": [
"./test/setup.js"

@@ -43,3 +43,3 @@ ]

"homepage": "https://github.com/jquense/react-common-hooks#readme",
"_id": "@restart/hooks@0.3.12"
"_id": "@restart/hooks@0.3.13"
}
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