@alessiofrittoli/react-hooks 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +387 -73
- package/dist/eslint.js +1 -1
- package/dist/eslint.mjs +1 -1
- package/dist/index.d.mts +940 -11
- package/dist/index.d.ts +940 -11
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +132 -146
- package/dist/browser-api/index.d.mts +0 -6
- package/dist/browser-api/index.d.ts +0 -6
- package/dist/browser-api/index.js +0 -1
- package/dist/browser-api/index.mjs +0 -1
- package/dist/browser-api/storage/index.d.mts +0 -4
- package/dist/browser-api/storage/index.d.ts +0 -4
- package/dist/browser-api/storage/index.js +0 -1
- package/dist/browser-api/storage/index.mjs +0 -1
- package/dist/browser-api/storage/useLocalStorage.d.mts +0 -11
- package/dist/browser-api/storage/useLocalStorage.d.ts +0 -11
- package/dist/browser-api/storage/useLocalStorage.js +0 -1
- package/dist/browser-api/storage/useLocalStorage.mjs +0 -1
- package/dist/browser-api/storage/useSessionStorage.d.mts +0 -11
- package/dist/browser-api/storage/useSessionStorage.d.ts +0 -11
- package/dist/browser-api/storage/useSessionStorage.js +0 -1
- package/dist/browser-api/storage/useSessionStorage.mjs +0 -1
- package/dist/browser-api/storage/useStorage.d.mts +0 -12
- package/dist/browser-api/storage/useStorage.d.ts +0 -12
- package/dist/browser-api/storage/useStorage.js +0 -1
- package/dist/browser-api/storage/useStorage.mjs +0 -1
- package/dist/browser-api/useIsPortrait.d.mts +0 -10
- package/dist/browser-api/useIsPortrait.d.ts +0 -10
- package/dist/browser-api/useIsPortrait.js +0 -1
- package/dist/browser-api/useIsPortrait.mjs +0 -1
- package/dist/browser-api/useMediaQuery.d.mts +0 -11
- package/dist/browser-api/useMediaQuery.d.ts +0 -11
- package/dist/browser-api/useMediaQuery.js +0 -1
- package/dist/browser-api/useMediaQuery.mjs +0 -1
- package/dist/chunk-26XSIIUK.mjs +0 -1
- package/dist/chunk-2CZNCZFR.mjs +0 -0
- package/dist/chunk-43RVMR6S.mjs +0 -1
- package/dist/chunk-4BGMCO3F.js +0 -1
- package/dist/chunk-65SF33P4.mjs +0 -1
- package/dist/chunk-6BSD56XC.js +0 -1
- package/dist/chunk-6IRIG5HU.mjs +0 -1
- package/dist/chunk-7ILYMOVB.js +0 -1
- package/dist/chunk-AJKPRTOJ.mjs +0 -1
- package/dist/chunk-EFFJB2GR.js +0 -1
- package/dist/chunk-FUCUVFLW.js +0 -1
- package/dist/chunk-G55NP3QG.js +0 -1
- package/dist/chunk-HO57SPST.js +0 -1
- package/dist/chunk-HZLWSH3W.mjs +0 -1
- package/dist/chunk-IDNLFWFO.js +0 -1
- package/dist/chunk-RENUP2VU.mjs +0 -1
- package/dist/chunk-SNMJ53QB.js +0 -1
- package/dist/chunk-SW7BCMZF.js +0 -1
- package/dist/chunk-TA6PCHH4.js +0 -1
- package/dist/chunk-UAJXVBNR.mjs +0 -1
- package/dist/chunk-UXNKH2MC.mjs +0 -1
- package/dist/chunk-VLSP3MAN.js +0 -1
- package/dist/chunk-WLIFJNZA.mjs +0 -0
- package/dist/chunk-WOVEE75M.js +0 -1
- package/dist/chunk-YAZXPL6I.mjs +0 -1
- package/dist/chunk-YLUTFORB.js +0 -1
- package/dist/chunk-YQO25XKN.mjs +0 -0
- package/dist/chunk-ZNAB4TYW.mjs +0 -0
- package/dist/dom-api/index.d.mts +0 -2
- package/dist/dom-api/index.d.ts +0 -2
- package/dist/dom-api/index.js +0 -1
- package/dist/dom-api/index.mjs +0 -1
- package/dist/dom-api/useFocusTrap.d.mts +0 -15
- package/dist/dom-api/useFocusTrap.d.ts +0 -15
- package/dist/dom-api/useFocusTrap.js +0 -1
- package/dist/dom-api/useFocusTrap.mjs +0 -1
- package/dist/dom-api/useScrollBlock.d.mts +0 -8
- package/dist/dom-api/useScrollBlock.d.ts +0 -8
- package/dist/dom-api/useScrollBlock.js +0 -1
- package/dist/dom-api/useScrollBlock.mjs +0 -1
- package/dist/misc/index.d.mts +0 -3
- package/dist/misc/index.d.ts +0 -3
- package/dist/misc/index.js +0 -1
- package/dist/misc/index.mjs +0 -1
- package/dist/misc/useIsClient.d.mts +0 -8
- package/dist/misc/useIsClient.d.ts +0 -8
- package/dist/misc/useIsClient.js +0 -1
- package/dist/misc/useIsClient.mjs +0 -1
- package/dist/misc/useIsFirstRender.d.mts +0 -9
- package/dist/misc/useIsFirstRender.d.ts +0 -9
- package/dist/misc/useIsFirstRender.js +0 -1
- package/dist/misc/useIsFirstRender.mjs +0 -1
- package/dist/misc/usePagination.d.mts +0 -12
- package/dist/misc/usePagination.d.ts +0 -12
- package/dist/misc/usePagination.js +0 -1
- package/dist/misc/usePagination.mjs +0 -1
- package/dist/misc/useUpdateEffect.d.mts +0 -9
- package/dist/misc/useUpdateEffect.d.ts +0 -9
- package/dist/misc/useUpdateEffect.js +0 -1
- package/dist/misc/useUpdateEffect.mjs +0 -1
package/dist/chunk-IDNLFWFO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7ILYMOVBjs = require('./chunk-7ILYMOVB.js');var a=(r,t)=>_chunk7ILYMOVBjs.a.call(void 0, r,t,"local");exports.a = a;
|
package/dist/chunk-RENUP2VU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-AJKPRTOJ.mjs";import{portraitMediaQuery as o}from"@alessiofrittoli/web-utils/device";var m=()=>r(o);export{m as a};
|
package/dist/chunk-SNMJ53QB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _react = require('react');var _dom = require('@alessiofrittoli/web-utils/dom');var S=l=>{let r=_react.useCallback.call(void 0, ()=>_dom.blockScroll.call(void 0, _optionalChain([l, 'optionalAccess', _ => _.current])||void 0),[l]),c=_react.useCallback.call(void 0, ()=>_dom.restoreScroll.call(void 0, _optionalChain([l, 'optionalAccess', _2 => _2.current])||void 0),[l]);return[r,c]};exports.a = S;
|
package/dist/chunk-SW7BCMZF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _react = require('react');var E=["input","select","textarea","button","[href]",'[tabindex]:not([tabindex="-1"])'].join(", "),b= exports.a =n=>{let[r,o]=_react.useState.call(void 0, !1),s=_react.useRef.call(void 0, null),f=_react.useCallback.call(void 0, t=>{s.current=document.activeElement;let e=t||_optionalChain([n, 'optionalAccess', _ => _.current])||!1;if(e)return o(e)},[n]),i=_react.useCallback.call(void 0, ()=>{_optionalChain([s, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.focus, 'call', _4 => _4()]),o(!1)},[]);return _react.useEffect.call(void 0, ()=>{if(!r)return;let t=e=>{if(e.key!=="Tab")return;let c=Array.from(r.querySelectorAll(E)),u=c.at(0),a=c.at(-1);if(!e.shiftKey){document.activeElement===a&&(e.preventDefault(),_optionalChain([u, 'optionalAccess', _5 => _5.focus, 'call', _6 => _6()]));return}document.activeElement===u&&(e.preventDefault(),_optionalChain([a, 'optionalAccess', _7 => _7.focus, 'call', _8 => _8()]))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[r]),[f,i]};exports.a = b;
|
package/dist/chunk-TA6PCHH4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/chunk-UAJXVBNR.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-26XSIIUK.mjs";import{useEffect as c}from"react";var a=(t,r)=>{let s=e();c(()=>{if(!s)return t()},r)};export{a};
|
package/dist/chunk-UXNKH2MC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-HZLWSH3W.mjs";var n=(o,e)=>s(o,e,"session");export{n as a};
|
package/dist/chunk-VLSP3MAN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var o=()=>{let[e,t]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>t(!0),[]),e};exports.a = o;
|
package/dist/chunk-WLIFJNZA.mjs
DELETED
|
File without changes
|
package/dist/chunk-WOVEE75M.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFUCUVFLWjs = require('./chunk-FUCUVFLW.js');var _device = require('@alessiofrittoli/web-utils/device');var a=()=>_chunkFUCUVFLWjs.a.call(void 0, _device.portraitMediaQuery);exports.a = a;
|
package/dist/chunk-YAZXPL6I.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-HZLWSH3W.mjs";var g=(r,t)=>o(r,t,"local");export{g as a};
|
package/dist/chunk-YLUTFORB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/chunk-YQO25XKN.mjs
DELETED
|
File without changes
|
package/dist/chunk-ZNAB4TYW.mjs
DELETED
|
File without changes
|
package/dist/dom-api/index.d.mts
DELETED
package/dist/dom-api/index.d.ts
DELETED
package/dist/dom-api/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6BSD56XC.js');var _chunkSW7BCMZFjs = require('../chunk-SW7BCMZF.js');var _chunkSNMJ53QBjs = require('../chunk-SNMJ53QB.js');exports.useFocusTrap = _chunkSW7BCMZFjs.a; exports.useScrollBlock = _chunkSNMJ53QBjs.a;
|
package/dist/dom-api/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunk-WLIFJNZA.mjs";import{a}from"../chunk-6IRIG5HU.mjs";import{a as b}from"../chunk-43RVMR6S.mjs";export{a as useFocusTrap,b as useScrollBlock};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type SetFocusTrap = (target?: HTMLElement) => void;
|
|
2
|
-
type RestoreFocusTrap = () => void;
|
|
3
|
-
/**
|
|
4
|
-
* Trap focus inside the given HTML Element.
|
|
5
|
-
*
|
|
6
|
-
* @param target (Optional) The target HTMLElement React RefObject to trap focus within.
|
|
7
|
-
* If no target is given, you must provide the target HTMLElement when calling `setFocusTrap`.
|
|
8
|
-
*
|
|
9
|
-
* @returns A tuple containing:
|
|
10
|
-
* - `setFocusTrap`: A function to enable the focus trap. Optionally accept an HTMLElement as target.
|
|
11
|
-
* - `restoreFocusTrap`: A function to restore the previous focus state.
|
|
12
|
-
*/
|
|
13
|
-
declare const useFocusTrap: (target?: React.RefObject<HTMLElement | null>) => readonly [SetFocusTrap, RestoreFocusTrap];
|
|
14
|
-
|
|
15
|
-
export { useFocusTrap };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type SetFocusTrap = (target?: HTMLElement) => void;
|
|
2
|
-
type RestoreFocusTrap = () => void;
|
|
3
|
-
/**
|
|
4
|
-
* Trap focus inside the given HTML Element.
|
|
5
|
-
*
|
|
6
|
-
* @param target (Optional) The target HTMLElement React RefObject to trap focus within.
|
|
7
|
-
* If no target is given, you must provide the target HTMLElement when calling `setFocusTrap`.
|
|
8
|
-
*
|
|
9
|
-
* @returns A tuple containing:
|
|
10
|
-
* - `setFocusTrap`: A function to enable the focus trap. Optionally accept an HTMLElement as target.
|
|
11
|
-
* - `restoreFocusTrap`: A function to restore the previous focus state.
|
|
12
|
-
*/
|
|
13
|
-
declare const useFocusTrap: (target?: React.RefObject<HTMLElement | null>) => readonly [SetFocusTrap, RestoreFocusTrap];
|
|
14
|
-
|
|
15
|
-
export { useFocusTrap };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSW7BCMZFjs = require('../chunk-SW7BCMZF.js');exports.useFocusTrap = _chunkSW7BCMZFjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-6IRIG5HU.mjs";export{a as useFocusTrap};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prevent Element overflow.
|
|
3
|
-
*
|
|
4
|
-
* @param target (Optional) The React RefObject target HTMLElement. Default: `Document.documentElement`.
|
|
5
|
-
*/
|
|
6
|
-
declare const useScrollBlock: (target?: React.RefObject<HTMLElement | null>) => readonly [() => void, () => void];
|
|
7
|
-
|
|
8
|
-
export { useScrollBlock };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prevent Element overflow.
|
|
3
|
-
*
|
|
4
|
-
* @param target (Optional) The React RefObject target HTMLElement. Default: `Document.documentElement`.
|
|
5
|
-
*/
|
|
6
|
-
declare const useScrollBlock: (target?: React.RefObject<HTMLElement | null>) => readonly [() => void, () => void];
|
|
7
|
-
|
|
8
|
-
export { useScrollBlock };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSNMJ53QBjs = require('../chunk-SNMJ53QB.js');exports.useScrollBlock = _chunkSNMJ53QBjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-43RVMR6S.mjs";export{a as useScrollBlock};
|
package/dist/misc/index.d.mts
DELETED
package/dist/misc/index.d.ts
DELETED
package/dist/misc/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-YLUTFORB.js');var _chunkVLSP3MANjs = require('../chunk-VLSP3MAN.js');var _chunkEFFJB2GRjs = require('../chunk-EFFJB2GR.js');var _chunkHO57SPSTjs = require('../chunk-HO57SPST.js');exports.useIsClient = _chunkVLSP3MANjs.a; exports.useIsFirstRender = _chunkHO57SPSTjs.a; exports.useUpdateEffect = _chunkEFFJB2GRjs.a;
|
package/dist/misc/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunk-ZNAB4TYW.mjs";import{a}from"../chunk-65SF33P4.mjs";import{a as c}from"../chunk-UAJXVBNR.mjs";import{a as b}from"../chunk-26XSIIUK.mjs";export{a as useIsClient,b as useIsFirstRender,c as useUpdateEffect};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the React Hook or Component where this hook is executed is running in a browser environment.
|
|
3
|
-
*
|
|
4
|
-
* @returns `true` if the React Hook or Component is running in a browser environment, `false` otherwise.
|
|
5
|
-
*/
|
|
6
|
-
declare const useIsClient: () => boolean;
|
|
7
|
-
|
|
8
|
-
export { useIsClient };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the React Hook or Component where this hook is executed is running in a browser environment.
|
|
3
|
-
*
|
|
4
|
-
* @returns `true` if the React Hook or Component is running in a browser environment, `false` otherwise.
|
|
5
|
-
*/
|
|
6
|
-
declare const useIsClient: () => boolean;
|
|
7
|
-
|
|
8
|
-
export { useIsClient };
|
package/dist/misc/useIsClient.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVLSP3MANjs = require('../chunk-VLSP3MAN.js');exports.useIsClient = _chunkVLSP3MANjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-65SF33P4.mjs";export{a as useIsClient};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if is first React Hook/Component render.
|
|
3
|
-
*
|
|
4
|
-
* @returns `true` at the mount time, then always `false`.
|
|
5
|
-
* - Note that if the React Hook/Component has no state updates, `useIsFirstRender` will always return `true`.
|
|
6
|
-
*/
|
|
7
|
-
declare const useIsFirstRender: () => boolean;
|
|
8
|
-
|
|
9
|
-
export { useIsFirstRender };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if is first React Hook/Component render.
|
|
3
|
-
*
|
|
4
|
-
* @returns `true` at the mount time, then always `false`.
|
|
5
|
-
* - Note that if the React Hook/Component has no state updates, `useIsFirstRender` will always return `true`.
|
|
6
|
-
*/
|
|
7
|
-
declare const useIsFirstRender: () => boolean;
|
|
8
|
-
|
|
9
|
-
export { useIsFirstRender };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHO57SPSTjs = require('../chunk-HO57SPST.js');exports.useIsFirstRender = _chunkHO57SPSTjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-26XSIIUK.mjs";export{a as useIsFirstRender};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as _alessiofrittoli_math_utils_helpers from '@alessiofrittoli/math-utils/helpers';
|
|
2
|
-
import { PaginateOptions } from '@alessiofrittoli/math-utils/helpers';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get pagination informations based on the given options.
|
|
6
|
-
*
|
|
7
|
-
* @param options An object defining pagination input data. See {@link PaginateOptions} for more information.
|
|
8
|
-
* @returns A memoized object containing pagination informations based on the given options.
|
|
9
|
-
*/
|
|
10
|
-
declare const usePagination: (options?: PaginateOptions) => _alessiofrittoli_math_utils_helpers.Pagination;
|
|
11
|
-
|
|
12
|
-
export { usePagination };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as _alessiofrittoli_math_utils_helpers from '@alessiofrittoli/math-utils/helpers';
|
|
2
|
-
import { PaginateOptions } from '@alessiofrittoli/math-utils/helpers';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get pagination informations based on the given options.
|
|
6
|
-
*
|
|
7
|
-
* @param options An object defining pagination input data. See {@link PaginateOptions} for more information.
|
|
8
|
-
* @returns A memoized object containing pagination informations based on the given options.
|
|
9
|
-
*/
|
|
10
|
-
declare const usePagination: (options?: PaginateOptions) => _alessiofrittoli_math_utils_helpers.Pagination;
|
|
11
|
-
|
|
12
|
-
export { usePagination };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var _helpers = require('@alessiofrittoli/math-utils/helpers');var p=(t={})=>_react.useMemo.call(void 0, ()=>_helpers.paginate.call(void 0, t),[t]);exports.usePagination = p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useMemo as a}from"react";import{paginate as e}from"@alessiofrittoli/math-utils/helpers";var m=(t={})=>a(()=>e(t),[t]);export{m as usePagination};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Modified version of `useEffect` that skips the first render.
|
|
3
|
-
*
|
|
4
|
-
* @param effect Imperative function that can return a cleanup function.
|
|
5
|
-
* @param deps If present, effect will only activate if the values in the list change.
|
|
6
|
-
*/
|
|
7
|
-
declare const useUpdateEffect: (effect: React.EffectCallback, deps?: React.DependencyList) => void;
|
|
8
|
-
|
|
9
|
-
export { useUpdateEffect };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Modified version of `useEffect` that skips the first render.
|
|
3
|
-
*
|
|
4
|
-
* @param effect Imperative function that can return a cleanup function.
|
|
5
|
-
* @param deps If present, effect will only activate if the values in the list change.
|
|
6
|
-
*/
|
|
7
|
-
declare const useUpdateEffect: (effect: React.EffectCallback, deps?: React.DependencyList) => void;
|
|
8
|
-
|
|
9
|
-
export { useUpdateEffect };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEFFJB2GRjs = require('../chunk-EFFJB2GR.js');require('../chunk-HO57SPST.js');exports.useUpdateEffect = _chunkEFFJB2GRjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-UAJXVBNR.mjs";import"../chunk-26XSIIUK.mjs";export{a as useUpdateEffect};
|