react-use
Advanced tools
Comparing version 17.0.1 to 17.0.2
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
509729
9816