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

react-use

Package Overview
Dependencies
Maintainers
1
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use - npm Package Compare versions

Comparing version 17.0.1 to 17.0.2

2

esm/useMeasure.d.ts

@@ -5,3 +5,3 @@ export declare type UseMeasureRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;

declare function useMeasure<E extends HTMLElement = HTMLElement>(): UseMeasureResult<E>;
declare const _default: typeof useMeasure | (() => ((() => void) | Pick<DOMRectReadOnly, "left" | "right" | "bottom" | "top" | "x" | "y" | "height" | "width">)[]);
declare const _default: typeof useMeasure;
export default _default;

@@ -37,2 +37,2 @@ import { useMemo, useState } from 'react';

? useMeasure
: function () { return [noop, defaultState]; };
: (function () { return [noop, defaultState]; });

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

declare const useUpdate: () => () => void;
export default useUpdate;
export default function useUpdate(): () => void;
import { useReducer } from 'react';
var updateReducer = function (num) { return (num + 1) % 1000000; };
var useUpdate = function () {
export default function useUpdate() {
var _a = useReducer(updateReducer, 0), update = _a[1];
return update;
};
export default useUpdate;
}

@@ -5,3 +5,3 @@ export declare type UseMeasureRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;

declare function useMeasure<E extends HTMLElement = HTMLElement>(): UseMeasureResult<E>;
declare const _default: typeof useMeasure | (() => ((() => void) | Pick<DOMRectReadOnly, "left" | "right" | "bottom" | "top" | "x" | "y" | "height" | "width">)[]);
declare const _default: typeof useMeasure;
export default _default;

@@ -40,2 +40,2 @@ "use strict";

? useMeasure
: function () { return [util_1.noop, defaultState]; };
: (function () { return [util_1.noop, defaultState]; });

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

declare const useUpdate: () => () => void;
export default useUpdate;
export default function useUpdate(): () => void;

@@ -5,6 +5,6 @@ "use strict";

var updateReducer = function (num) { return (num + 1) % 1000000; };
var useUpdate = function () {
function useUpdate() {
var _a = react_1.useReducer(updateReducer, 0), update = _a[1];
return update;
};
}
exports.default = useUpdate;
{
"name": "react-use",
"version": "17.0.1",
"version": "17.0.2",
"description": "Collection of React Hooks",

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

Sorry, the diff of this file is too big to display

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