New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-hookz/web

Package Overview
Dependencies
Maintainers
2
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hookz/web - npm Package Compare versions

Comparing version 20.0.3 to 20.1.0

cjs/useDocumentVisibility/useDocumentVisibility.d.ts

2

cjs/index.d.ts

@@ -29,2 +29,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback';

export { usePreviousDistinct } from './usePreviousDistinct/usePreviousDistinct';
export { useQueue, QueueMethods } from './useQueue/useQueue';
export { useRafState } from './useRafState/useRafState';

@@ -52,2 +53,3 @@ export { useRenderCount } from './useRenderCount/useRenderCount';

export { useKeyboardEvent, KeyboardEventPredicate, KeyboardEventFilter, KeyboardEventHandler, UseKeyboardEventOptions, } from './useKeyboardEvent/useKeyboardEvent';
export { useDocumentVisibility } from './useDocumentVisibility/useDocumentVisibility';
export { ScreenOrientation, useScreenOrientation, } from './useScreenOrientation/useScreenOrientation';

@@ -54,0 +56,0 @@ export { useClickOutside } from './useClickOutside/useClickOutside';

8

cjs/index.js

@@ -17,4 +17,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.useKeyboardEvent = exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useCustomCompareMemo = exports.useHookableRef = exports.useSyncedRef = exports.useVibrate = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.useRenderCount = exports.useRafState = exports.usePreviousDistinct = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useList = exports.useFunctionalState = exports.useDebouncedState = exports.useCounter = exports.useControlledRerenderState = exports.useTimeoutEffect = exports.useIntervalEffect = exports.useLifecycleLogger = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = exports.useRafEffect = exports.useMountEffect = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useFirstMountState = exports.useDeepCompareEffect = exports.useDebouncedEffect = exports.useCustomCompareEffect = exports.useConditionalEffect = exports.useThrottledCallback = exports.useRafCallback = exports.useDebouncedCallback = void 0;
exports.useDeepCompareMemo = exports.resolveHookState = exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useWindowSize = exports.useEventListener = exports.useClickOutside = exports.useScreenOrientation = void 0;
exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useCustomCompareMemo = exports.useHookableRef = exports.useSyncedRef = exports.useVibrate = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.useRenderCount = exports.useRafState = exports.useQueue = exports.usePreviousDistinct = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useList = exports.useFunctionalState = exports.useDebouncedState = exports.useCounter = exports.useControlledRerenderState = exports.useTimeoutEffect = exports.useIntervalEffect = exports.useLifecycleLogger = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = exports.useRafEffect = exports.useMountEffect = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useFirstMountState = exports.useDeepCompareEffect = exports.useDebouncedEffect = exports.useCustomCompareEffect = exports.useConditionalEffect = exports.useThrottledCallback = exports.useRafCallback = exports.useDebouncedCallback = void 0;
exports.useDeepCompareMemo = exports.resolveHookState = exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useWindowSize = exports.useEventListener = exports.useClickOutside = exports.useScreenOrientation = exports.useDocumentVisibility = exports.useKeyboardEvent = void 0;
// Callback

@@ -79,2 +79,4 @@ var useDebouncedCallback_1 = require("./useDebouncedCallback/useDebouncedCallback");

Object.defineProperty(exports, "usePreviousDistinct", { enumerable: true, get: function () { return usePreviousDistinct_1.usePreviousDistinct; } });
var useQueue_1 = require("./useQueue/useQueue");
Object.defineProperty(exports, "useQueue", { enumerable: true, get: function () { return useQueue_1.useQueue; } });
var useRafState_1 = require("./useRafState/useRafState");

@@ -128,2 +130,4 @@ Object.defineProperty(exports, "useRafState", { enumerable: true, get: function () { return useRafState_1.useRafState; } });

Object.defineProperty(exports, "useKeyboardEvent", { enumerable: true, get: function () { return useKeyboardEvent_1.useKeyboardEvent; } });
var useDocumentVisibility_1 = require("./useDocumentVisibility/useDocumentVisibility");
Object.defineProperty(exports, "useDocumentVisibility", { enumerable: true, get: function () { return useDocumentVisibility_1.useDocumentVisibility; } });
var useScreenOrientation_1 = require("./useScreenOrientation/useScreenOrientation");

@@ -130,0 +134,0 @@ Object.defineProperty(exports, "useScreenOrientation", { enumerable: true, get: function () { return useScreenOrientation_1.useScreenOrientation; } });

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

state.current = newState;
if (typeof rerender === 'undefined' || rerender) {
if (rerender === undefined || rerender) {
rr();

@@ -24,0 +24,0 @@ }

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

/* istanbul ignore next */
if (process.env.NODE_ENV === 'development' && typeof js_cookie_1.default === 'undefined') {
if (process.env.NODE_ENV === 'development' && js_cookie_1.default === undefined) {
throw new ReferenceError('Dependency `js-cookies` is not installed, it is required for `useCookieValue` work.');

@@ -70,0 +70,0 @@ }

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

var _a = (0, useMediatedState_1.useMediatedState)(initialValue, function (v) {
if (typeof max !== 'undefined') {
if (max !== undefined) {
v = Math.min(max, v);
}
if (typeof min !== 'undefined') {
if (min !== undefined) {
v = Math.max(min, v);

@@ -26,0 +26,0 @@ }

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

get current() {
return typeof onGetRef.current !== 'undefined' ? onGetRef.current(v) : v;
return onGetRef.current === undefined ? v : onGetRef.current(v);
},
set current(val) {
v = typeof onSetRef.current !== 'undefined' ? onSetRef.current(val) : val;
v = onSetRef.current === undefined ? val : onSetRef.current(val);
},

@@ -28,0 +28,0 @@ };

@@ -18,4 +18,7 @@ "use strict";

*/
exports.useLocalStorageValue = !IS_LOCAL_STORAGE_AVAILABLE
? function (_key, _options) {
exports.useLocalStorageValue = IS_LOCAL_STORAGE_AVAILABLE
? function (key, options) {
return (0, useStorageValue_1.useStorageValue)(localStorage, key, options);
}
: function (_key, _options) {
if (const_1.isBrowser && process.env.NODE_ENV === 'development') {

@@ -26,5 +29,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: const_1.noop, remove: const_1.noop, fetch: const_1.noop };
}
: function (key, options) {
return (0, useStorageValue_1.useStorageValue)(localStorage, key, options);
};

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

previous: previousOnline,
since: online !== previousOnline ? new Date() : previousState === null || previousState === void 0 ? void 0 : previousState.since,
since: online === previousOnline ? previousState === null || previousState === void 0 ? void 0 : previousState.since : new Date(),
downlink: conn === null || conn === void 0 ? void 0 : conn.downlink,

@@ -19,0 +19,0 @@ downlinkMax: conn === null || conn === void 0 ? void 0 : conn.downlinkMax,

@@ -16,4 +16,4 @@ "use strict";

});
return typeof matches === 'undefined' ? undefined : matches ? 'portrait' : 'landscape';
return matches === undefined ? undefined : matches ? 'portrait' : 'landscape';
}
exports.useScreenOrientation = useScreenOrientation;

@@ -18,4 +18,7 @@ "use strict";

*/
exports.useSessionStorageValue = !IS_SESSION_STORAGE_AVAILABLE
? function (_key, _options) {
exports.useSessionStorageValue = IS_SESSION_STORAGE_AVAILABLE
? function (key, options) {
return (0, useStorageValue_1.useStorageValue)(sessionStorage, key, options);
}
: function (_key, _options) {
if (const_1.isBrowser && process.env.NODE_ENV === 'development') {

@@ -26,5 +29,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: const_1.noop, remove: const_1.noop, fetch: const_1.noop };
}
: function (key, options) {
return (0, useStorageValue_1.useStorageValue)(sessionStorage, key, options);
};

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

var reset = (0, react_1.useCallback)(function () {
if (typeof msRef.current === 'undefined')
if (msRef.current === undefined)
return;

@@ -32,0 +32,0 @@ cancel();

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

setState(function (prevState) {
if (typeof nextState === 'undefined' ||
if (nextState === undefined ||
(ignoreReactEventsRef.current &&

@@ -31,0 +31,0 @@ typeof nextState === 'object' &&

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

*/
exports.useVibrate = !const_1.isBrowser || typeof navigator.vibrate === 'undefined'
exports.useVibrate = !const_1.isBrowser || navigator.vibrate === undefined
? const_1.noop

@@ -16,0 +16,0 @@ : function useVibrate(enabled, pattern, loop) {

@@ -29,2 +29,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback';

export { usePreviousDistinct } from './usePreviousDistinct/usePreviousDistinct';
export { useQueue, QueueMethods } from './useQueue/useQueue';
export { useRafState } from './useRafState/useRafState';

@@ -52,2 +53,3 @@ export { useRenderCount } from './useRenderCount/useRenderCount';

export { useKeyboardEvent, KeyboardEventPredicate, KeyboardEventFilter, KeyboardEventHandler, UseKeyboardEventOptions, } from './useKeyboardEvent/useKeyboardEvent';
export { useDocumentVisibility } from './useDocumentVisibility/useDocumentVisibility';
export { ScreenOrientation, useScreenOrientation, } from './useScreenOrientation/useScreenOrientation';

@@ -54,0 +56,0 @@ export { useClickOutside } from './useClickOutside/useClickOutside';

@@ -32,2 +32,3 @@ // Callback

export { usePreviousDistinct } from "./usePreviousDistinct/usePreviousDistinct.js";
export { useQueue } from "./useQueue/useQueue.js";
export { useRafState } from "./useRafState/useRafState.js";

@@ -59,2 +60,3 @@ export { useRenderCount } from "./useRenderCount/useRenderCount.js";

export { useKeyboardEvent, } from "./useKeyboardEvent/useKeyboardEvent.js";
export { useDocumentVisibility } from "./useDocumentVisibility/useDocumentVisibility.js";
export { useScreenOrientation, } from "./useScreenOrientation/useScreenOrientation.js";

@@ -61,0 +63,0 @@ // Dom

@@ -18,3 +18,3 @@ import { useCallback, useRef } from 'react';

state.current = newState;
if (typeof rerender === 'undefined' || rerender) {
if (rerender === undefined || rerender) {
rr();

@@ -21,0 +21,0 @@ }

@@ -61,3 +61,3 @@ var __rest = (this && this.__rest) || function (s, e) {

/* istanbul ignore next */
if (process.env.NODE_ENV === 'development' && typeof Cookies === 'undefined') {
if (process.env.NODE_ENV === 'development' && Cookies === undefined) {
throw new ReferenceError('Dependency `js-cookies` is not installed, it is required for `useCookieValue` work.');

@@ -64,0 +64,0 @@ }

@@ -17,6 +17,6 @@ import { useMemo } from 'react';

var _a = useMediatedState(initialValue, function (v) {
if (typeof max !== 'undefined') {
if (max !== undefined) {
v = Math.min(max, v);
}
if (typeof min !== 'undefined') {
if (min !== undefined) {
v = Math.max(min, v);

@@ -23,0 +23,0 @@ }

@@ -19,6 +19,6 @@ import { useMemo } from 'react';

get current() {
return typeof onGetRef.current !== 'undefined' ? onGetRef.current(v) : v;
return onGetRef.current === undefined ? v : onGetRef.current(v);
},
set current(val) {
v = typeof onSetRef.current !== 'undefined' ? onSetRef.current(val) : val;
v = onSetRef.current === undefined ? val : onSetRef.current(val);
},

@@ -25,0 +25,0 @@ };

@@ -15,4 +15,7 @@ import { useStorageValue, } from "../useStorageValue/useStorageValue.js";

*/
export var useLocalStorageValue = !IS_LOCAL_STORAGE_AVAILABLE
? function (_key, _options) {
export var useLocalStorageValue = IS_LOCAL_STORAGE_AVAILABLE
? function (key, options) {
return useStorageValue(localStorage, key, options);
}
: function (_key, _options) {
if (isBrowser && process.env.NODE_ENV === 'development') {

@@ -23,5 +26,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: noop, remove: noop, fetch: noop };
}
: function (key, options) {
return useStorageValue(localStorage, key, options);
};

@@ -13,3 +13,3 @@ import { useEffect } from 'react';

previous: previousOnline,
since: online !== previousOnline ? new Date() : previousState === null || previousState === void 0 ? void 0 : previousState.since,
since: online === previousOnline ? previousState === null || previousState === void 0 ? void 0 : previousState.since : new Date(),
downlink: conn === null || conn === void 0 ? void 0 : conn.downlink,

@@ -16,0 +16,0 @@ downlinkMax: conn === null || conn === void 0 ? void 0 : conn.downlinkMax,

@@ -13,3 +13,3 @@ import { useMediaQuery } from "../useMediaQuery/useMediaQuery.js";

});
return typeof matches === 'undefined' ? undefined : matches ? 'portrait' : 'landscape';
return matches === undefined ? undefined : matches ? 'portrait' : 'landscape';
}

@@ -15,4 +15,7 @@ import { useStorageValue, } from "../useStorageValue/useStorageValue.js";

*/
export var useSessionStorageValue = !IS_SESSION_STORAGE_AVAILABLE
? function (_key, _options) {
export var useSessionStorageValue = IS_SESSION_STORAGE_AVAILABLE
? function (key, options) {
return useStorageValue(sessionStorage, key, options);
}
: function (_key, _options) {
if (isBrowser && process.env.NODE_ENV === 'development') {

@@ -23,5 +26,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: noop, remove: noop, fetch: noop };
}
: function (key, options) {
return useStorageValue(sessionStorage, key, options);
};

@@ -26,3 +26,3 @@ import { useCallback, useEffect, useRef } from 'react';

var reset = useCallback(function () {
if (typeof msRef.current === 'undefined')
if (msRef.current === undefined)
return;

@@ -29,0 +29,0 @@ cancel();

@@ -25,3 +25,3 @@ import { useCallback } from 'react';

setState(function (prevState) {
if (typeof nextState === 'undefined' ||
if (nextState === undefined ||
(ignoreReactEventsRef.current &&

@@ -28,0 +28,0 @@ typeof nextState === 'object' &&

@@ -10,3 +10,3 @@ import { useEffect } from 'react';

*/
export var useVibrate = !isBrowser || typeof navigator.vibrate === 'undefined'
export var useVibrate = !isBrowser || navigator.vibrate === undefined
? noop

@@ -13,0 +13,0 @@ : function useVibrate(enabled, pattern, loop) {

@@ -29,2 +29,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback';

export { usePreviousDistinct } from './usePreviousDistinct/usePreviousDistinct';
export { useQueue, QueueMethods } from './useQueue/useQueue';
export { useRafState } from './useRafState/useRafState';

@@ -52,2 +53,3 @@ export { useRenderCount } from './useRenderCount/useRenderCount';

export { useKeyboardEvent, KeyboardEventPredicate, KeyboardEventFilter, KeyboardEventHandler, UseKeyboardEventOptions, } from './useKeyboardEvent/useKeyboardEvent';
export { useDocumentVisibility } from './useDocumentVisibility/useDocumentVisibility';
export { ScreenOrientation, useScreenOrientation, } from './useScreenOrientation/useScreenOrientation';

@@ -54,0 +56,0 @@ export { useClickOutside } from './useClickOutside/useClickOutside';

@@ -32,2 +32,3 @@ // Callback

export { usePreviousDistinct } from "./usePreviousDistinct/usePreviousDistinct.js";
export { useQueue } from "./useQueue/useQueue.js";
export { useRafState } from "./useRafState/useRafState.js";

@@ -59,2 +60,3 @@ export { useRenderCount } from "./useRenderCount/useRenderCount.js";

export { useKeyboardEvent, } from "./useKeyboardEvent/useKeyboardEvent.js";
export { useDocumentVisibility } from "./useDocumentVisibility/useDocumentVisibility.js";
export { useScreenOrientation, } from "./useScreenOrientation/useScreenOrientation.js";

@@ -61,0 +63,0 @@ // Dom

@@ -18,3 +18,3 @@ import { useCallback, useRef } from 'react';

state.current = newState;
if (typeof rerender === 'undefined' || rerender) {
if (rerender === undefined || rerender) {
rr();

@@ -21,0 +21,0 @@ }

@@ -49,3 +49,3 @@ /* eslint-disable @typescript-eslint/no-use-before-define,no-use-before-define */

/* istanbul ignore next */
if (process.env.NODE_ENV === 'development' && typeof Cookies === 'undefined') {
if (process.env.NODE_ENV === 'development' && Cookies === undefined) {
throw new ReferenceError('Dependency `js-cookies` is not installed, it is required for `useCookieValue` work.');

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

@@ -16,6 +16,6 @@ import { useMemo } from 'react';

const [state, setState] = useMediatedState(initialValue, (v) => {
if (typeof max !== 'undefined') {
if (max !== undefined) {
v = Math.min(max, v);
}
if (typeof min !== 'undefined') {
if (min !== undefined) {
v = Math.max(min, v);

@@ -22,0 +22,0 @@ }

@@ -19,6 +19,6 @@ import { useMemo } from 'react';

get current() {
return typeof onGetRef.current !== 'undefined' ? onGetRef.current(v) : v;
return onGetRef.current === undefined ? v : onGetRef.current(v);
},
set current(val) {
v = typeof onSetRef.current !== 'undefined' ? onSetRef.current(val) : val;
v = onSetRef.current === undefined ? val : onSetRef.current(val);
},

@@ -25,0 +25,0 @@ };

@@ -15,4 +15,7 @@ import { useStorageValue, } from "../useStorageValue/useStorageValue.js";

*/
export const useLocalStorageValue = !IS_LOCAL_STORAGE_AVAILABLE
? (_key, _options) => {
export const useLocalStorageValue = IS_LOCAL_STORAGE_AVAILABLE
? (key, options) => {
return useStorageValue(localStorage, key, options);
}
: (_key, _options) => {
if (isBrowser && process.env.NODE_ENV === 'development') {

@@ -23,5 +26,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: noop, remove: noop, fetch: noop };
}
: (key, options) => {
return useStorageValue(localStorage, key, options);
};

@@ -13,3 +13,3 @@ import { useEffect } from 'react';

previous: previousOnline,
since: online !== previousOnline ? new Date() : previousState?.since,
since: online === previousOnline ? previousState?.since : new Date(),
downlink: conn?.downlink,

@@ -16,0 +16,0 @@ downlinkMax: conn?.downlinkMax,

@@ -12,3 +12,3 @@ import { useMediaQuery } from "../useMediaQuery/useMediaQuery.js";

});
return typeof matches === 'undefined' ? undefined : matches ? 'portrait' : 'landscape';
return matches === undefined ? undefined : matches ? 'portrait' : 'landscape';
}

@@ -15,4 +15,7 @@ import { useStorageValue, } from "../useStorageValue/useStorageValue.js";

*/
export const useSessionStorageValue = !IS_SESSION_STORAGE_AVAILABLE
? (_key, _options) => {
export const useSessionStorageValue = IS_SESSION_STORAGE_AVAILABLE
? (key, options) => {
return useStorageValue(sessionStorage, key, options);
}
: (_key, _options) => {
if (isBrowser && process.env.NODE_ENV === 'development') {

@@ -23,5 +26,2 @@ // eslint-disable-next-line no-console

return { value: undefined, set: noop, remove: noop, fetch: noop };
}
: (key, options) => {
return useStorageValue(sessionStorage, key, options);
};

@@ -26,3 +26,3 @@ import { useCallback, useEffect, useRef } from 'react';

const reset = useCallback(() => {
if (typeof msRef.current === 'undefined')
if (msRef.current === undefined)
return;

@@ -29,0 +29,0 @@ cancel();

@@ -23,3 +23,3 @@ import { useCallback } from 'react';

setState((prevState) => {
if (typeof nextState === 'undefined' ||
if (nextState === undefined ||
(ignoreReactEventsRef.current &&

@@ -26,0 +26,0 @@ typeof nextState === 'object' &&

@@ -10,3 +10,3 @@ import { useEffect } from 'react';

*/
export const useVibrate = !isBrowser || typeof navigator.vibrate === 'undefined'
export const useVibrate = !isBrowser || navigator.vibrate === undefined
? noop

@@ -13,0 +13,0 @@ : function useVibrate(enabled, pattern, loop) {

{
"name": "@react-hookz/web",
"version": "20.0.3",
"version": "20.1.0",
"description": "React hooks done right, for browser and SSR.",

@@ -82,3 +82,3 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/core": "^7.20.7",
"@commitlint/cli": "^17.2.0",

@@ -88,3 +88,3 @@ "@commitlint/config-conventional": "^17.2.0",

"@jamesacarr/jest-reporter-github-actions": "^0.0.4",
"@react-hookz/eslint-config": "^1.7.5",
"@react-hookz/eslint-config": "^1.7.6",
"@react-hookz/eslint-formatter-gha": "^1.0.1",

@@ -94,14 +94,15 @@ "@semantic-release/changelog": "^6.0.2",

"@semantic-release/github": "^8.0.7",
"@storybook/addon-docs": "^6.5.12",
"@storybook/addon-essentials": "^6.5.14",
"@storybook/addon-links": "^6.5.14",
"@storybook/addon-docs": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addons": "^6.5.14",
"@storybook/builder-webpack5": "^6.5.14",
"@storybook/manager-webpack5": "^6.5.14",
"@storybook/react": "^6.5.14",
"@storybook/builder-webpack5": "^6.5.15",
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/react": "^6.5.15",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^6.5.14",
"@testing-library/react-hooks": "^8.0.1",
"@types/jest": "^29.2.4",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.2.5",
"@types/js-cookie": "^3.0.2",

@@ -108,0 +109,0 @@ "@types/react": "^18.0.17",

@@ -133,2 +133,4 @@ <div align="center">

Returns the most recent distinct value passed to the hook on previous renders.
- [**`useQueue`**](https://react-hookz.github.io/web/?path=/docs/state-usequeue--example) —
A state hook implementing FIFO queue.
- [**`useRafState`**](https://react-hookz.github.io/web/?path=/docs/state-userafstate--example) —

@@ -197,2 +199,4 @@ Like `React.useState`, but state is only updated within animation frame.

orientation change.
- [**`useDocumentVisibility`**](https://react-hookz.github.io/web/?path=/docs/sensor-usedocumentvisibility--example)
— Tracks document visibility state.

@@ -315,2 +319,9 @@ - #### Dom

<td align="center">
<a href="https://github.com/jpwallace22">
<img src="https://avatars.githubusercontent.com/u/93415734?v=4" width="100;" alt="jpwallace22"/>
<br />
<sub><b>Justin Wallace</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/KonradLinkowski">

@@ -321,3 +332,4 @@ <img src="https://avatars.githubusercontent.com/u/26126510?v=4" width="100;" alt="KonradLinkowski"/>

</a>
</td>
</td></tr>
<tr>
<td align="center">

@@ -329,4 +341,3 @@ <a href="https://github.com/MichalTarasiuk">

</a>
</td></tr>
<tr>
</td>
<td align="center">

@@ -333,0 +344,0 @@ <a href="https://github.com/fengkx">

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