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

@react-hookz/web

Package Overview
Dependencies
Maintainers
2
Versions
128
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 13.0.0 to 13.1.0

cjs/useRafState/useRafState.d.ts

8

CHANGELOG.md

@@ -0,1 +1,9 @@

# [13.1.0](https://github.com/react-hookz/web/compare/v13.0.0...v13.1.0) (2022-03-14)
### Features
* implement `useRafState` hook ([6cd44ec](https://github.com/react-hookz/web/commit/6cd44ecead3864aa1f0ece8ab3f5e02ae4e42cbf))
* implement `useWindowSize` hook ([81819cf](https://github.com/react-hookz/web/commit/81819cf63315564ee5f41174f5a036c158dad913))
# [13.0.0](https://github.com/react-hookz/web/compare/v12.3.0...v13.0.0) (2022-02-25)

@@ -2,0 +10,0 @@

2

cjs/index.d.ts

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

export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct';
export { useRafState } from './useRafState/useRafState';
export { useSafeState } from './useSafeState/useSafeState';

@@ -43,3 +44,4 @@ export { useSet } from './useSet/useSet';

export { useEventListener } from './useEventListener/useEventListener';
export { useWindowSize, WindowSize } from './useWindowSize/useWindowSize';
export { truthyAndArrayPredicate, truthyOrArrayPredicate } from './util/const';
export { IEffectCallback, IEffectHook } from './util/misc';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useEventListener = exports.useDocumentTitle = exports.useClickOutside = exports.useScreenOrientation = exports.useKeyboardEvent = exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useSyncedRef = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.usePreviousDistinct = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useDebouncedState = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = 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.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useWindowSize = exports.useEventListener = exports.useDocumentTitle = exports.useClickOutside = exports.useScreenOrientation = exports.useKeyboardEvent = exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useSyncedRef = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.useRafState = exports.usePreviousDistinct = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useDebouncedState = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = exports.useMountEffect = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useFirstMountState = exports.useDeepCompareEffect = exports.useDebouncedEffect = exports.useCustomCompareEffect = exports.useConditionalEffect = exports.useThrottledCallback = exports.useRafCallback = exports.useDebouncedCallback = void 0;
/* eslint-disable import/no-cycle */

@@ -48,2 +48,4 @@ // Callback

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

@@ -96,4 +98,6 @@ Object.defineProperty(exports, "useSafeState", { enumerable: true, get: function () { return useSafeState_1.useSafeState; } });

Object.defineProperty(exports, "useEventListener", { enumerable: true, get: function () { return useEventListener_1.useEventListener; } });
var useWindowSize_1 = require("./useWindowSize/useWindowSize");
Object.defineProperty(exports, "useWindowSize", { enumerable: true, get: function () { return useWindowSize_1.useWindowSize; } });
var const_1 = require("./util/const");
Object.defineProperty(exports, "truthyAndArrayPredicate", { enumerable: true, get: function () { return const_1.truthyAndArrayPredicate; } });
Object.defineProperty(exports, "truthyOrArrayPredicate", { enumerable: true, get: function () { return const_1.truthyOrArrayPredicate; } });

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

export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct';
export { useRafState } from './useRafState/useRafState';
export { useSafeState } from './useSafeState/useSafeState';

@@ -43,3 +44,4 @@ export { useSet } from './useSet/useSet';

export { useEventListener } from './useEventListener/useEventListener';
export { useWindowSize, WindowSize } from './useWindowSize/useWindowSize';
export { truthyAndArrayPredicate, truthyOrArrayPredicate } from './util/const';
export { IEffectCallback, IEffectHook } from './util/misc';

@@ -25,2 +25,3 @@ /* eslint-disable import/no-cycle */

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

@@ -52,2 +53,3 @@ export { useSet } from "./useSet/useSet.js";

export { useEventListener } from "./useEventListener/useEventListener.js";
export { useWindowSize } from "./useWindowSize/useWindowSize.js";
export { truthyAndArrayPredicate, truthyOrArrayPredicate } from "./util/const.js";

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

export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct';
export { useRafState } from './useRafState/useRafState';
export { useSafeState } from './useSafeState/useSafeState';

@@ -43,3 +44,4 @@ export { useSet } from './useSet/useSet';

export { useEventListener } from './useEventListener/useEventListener';
export { useWindowSize, WindowSize } from './useWindowSize/useWindowSize';
export { truthyAndArrayPredicate, truthyOrArrayPredicate } from './util/const';
export { IEffectCallback, IEffectHook } from './util/misc';

@@ -25,2 +25,3 @@ /* eslint-disable import/no-cycle */

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

@@ -52,2 +53,3 @@ export { useSet } from "./useSet/useSet.js";

export { useEventListener } from "./useEventListener/useEventListener.js";
export { useWindowSize } from "./useWindowSize/useWindowSize.js";
export { truthyAndArrayPredicate, truthyOrArrayPredicate } from "./util/const.js";

12

package.json
{
"name": "@react-hookz/web",
"version": "13.0.0",
"version": "13.1.0",
"description": "React hooks done right, for browser and SSR.",

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

"@jamesacarr/jest-reporter-github-actions": "^0.0.4",
"@react-hookz/eslint-config": "^1.5.0",
"@react-hookz/eslint-config": "^1.6.0",
"@semantic-release/changelog": "^6.0.1",

@@ -104,3 +104,3 @@ "@semantic-release/git": "^10.0.1",

"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/react-dom": "^17.0.13",
"babel-loader": "^8.2.3",

@@ -115,3 +115,3 @@ "commitizen": "^4.2.4",

"js-cookie": "^3.0.1",
"lint-staged": "^12.3.4",
"lint-staged": "^12.3.5",
"prettier": "^2.5.1",

@@ -123,7 +123,7 @@ "react": "^17.0.2",

"ts-jest": "^27.1.3",
"ts-node": "^10.5.0",
"ts-node": "^10.7.0",
"ttypescript": "^1.5.13",
"typescript": "^4.5.5",
"typescript": "^4.6.2",
"yarn": "^1.22.17"
}
}

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

Returns the most recent distinct value passed to the hook on previous render.
- [**`useRafState`**](https://react-hookz.github.io/web/?path=/docs/state-userafstate--example) —
Like `React.useState`, but state is only updated within animation frame.
- [**`useSafeState`**](https://react-hookz.github.io/web/?path=/docs/state-usesafestate--page) —

@@ -176,1 +178,3 @@ Like `useState`, but its state setter is guarded against sets on unmounted component.

— Executes callback when keyboard event occurred on target.
- [**`useWindowSize`**](https://react-hookz.github.io/web/?path=/docs/dom-usewindowsize--example)
— Tracks window inner dimensions.
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