@tamagui/use-previous 2.7.7 → 3.0.0-beta.643.1

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.
@@ -1,3 +1,4 @@
1
+
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5,48 +6,39 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
30
26
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
28
  var index_exports = {};
35
- __export(index_exports, {
36
- usePrevious: () => usePrevious
37
- });
29
+ __export(index_exports, { usePrevious: () => usePrevious });
38
30
  module.exports = __toCommonJS(index_exports);
39
31
  var React = __toESM(require("react"), 1);
40
32
  function usePrevious(value) {
41
- const ref = React.useRef({
42
- value,
43
- previous: value
44
- });
45
- return React.useMemo(() => {
46
- if (ref.current.value !== value) {
47
- ref.current.previous = ref.current.value;
48
- ref.current.value = value;
49
- }
50
- return ref.current.previous;
51
- }, [value]);
52
- }
33
+ const ref = React.useRef({
34
+ value,
35
+ previous: value
36
+ });
37
+ return React.useMemo(() => {
38
+ if (ref.current.value !== value) {
39
+ ref.current.previous = ref.current.value;
40
+ ref.current.value = value;
41
+ }
42
+ return ref.current.previous;
43
+ }, [value]);
44
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var index_exports = {};
31
+ __export(index_exports, { usePrevious: () => usePrevious });
32
+ module.exports = __toCommonJS(index_exports);
33
+ var React = __toESM(require("react"), 1);
34
+ function usePrevious(value) {
35
+ var ref = React.useRef({
36
+ value,
37
+ previous: value
38
+ });
39
+ return React.useMemo(function() {
40
+ if (ref.current.value !== value) {
41
+ ref.current.previous = ref.current.value;
42
+ ref.current.value = value;
43
+ }
44
+ return ref.current.previous;
45
+ }, [value]);
46
+ }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,49 +8,41 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var index_exports = {};
37
- __export(index_exports, {
38
- usePrevious: () => usePrevious
39
- });
31
+ __export(index_exports, { usePrevious: () => usePrevious });
40
32
  module.exports = __toCommonJS(index_exports);
41
33
  var React = __toESM(require("react"), 1);
42
34
  function usePrevious(value) {
43
- var ref = React.useRef({
44
- value,
45
- previous: value
46
- });
47
- return React.useMemo(function () {
48
- if (ref.current.value !== value) {
49
- ref.current.previous = ref.current.value;
50
- ref.current.value = value;
51
- }
52
- return ref.current.previous;
53
- }, [value]);
35
+ var ref = React.useRef({
36
+ value,
37
+ previous: value
38
+ });
39
+ return React.useMemo(function() {
40
+ if (ref.current.value !== value) {
41
+ ref.current.previous = ref.current.value;
42
+ ref.current.value = value;
43
+ }
44
+ return ref.current.previous;
45
+ }, [value]);
54
46
  }
47
+
55
48
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","usePrevious","module","exports","React","__toESM","require","ref","useRef","previous","useMemo","current"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAuB,GAAAT,YAAA,CAAAK,aAAA;AAEhB,IAAAK,KAAS,GAAAC,OAAA,CAAAC,OAAe,CAAa;AAC1C,SAAML,WAAYA,CAAAH,KAAA,EAAO;EAKzB,IAAAS,GAAO,GAAAH,KAAM,CAAAI,MAAQ;IACnBV,KAAI;IACFW,QAAI,EAAAX;EACJ;EAAoB,OACtBM,KAAA,CAAAM,OAAA;IACA,IAAAH,GAAO,CAAAI,OAAI,CAAAb,KAAQ,KAAAA,KAAA;MACjBS,GAAA,CAAAI,OAAM,CAAAF,QAAA,GAAAF,GAAA,CAAAI,OAAA,CAAAb,KAAA;MACZS,GAAA,CAAAI,OAAA,CAAAb,KAAA,GAAAA,KAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n usePrevious: () => usePrevious\n});\nmodule.exports = __toCommonJS(index_exports);\nvar React = __toESM(require(\"react\"), 1);\nfunction usePrevious(value) {\n var ref = React.useRef({\n value,\n previous: value\n });\n return React.useMemo(function() {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [\n value\n ]);\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe,EACtB,mBAAmB,YACrB,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,QAAQ,QAAQ,QAAQ,OAAO,GAAG,CAAC;AACvC,SAAS,YAAY,OAAO;CAC1B,IAAI,MAAM,MAAM,OAAO;EACrB;EACA,UAAU;CACZ,CAAC;CACD,OAAO,MAAM,QAAQ,WAAW;EAC9B,IAAI,IAAI,QAAQ,UAAU,OAAO;GAC/B,IAAI,QAAQ,WAAW,IAAI,QAAQ;GACnC,IAAI,QAAQ,QAAQ;EACtB;EACA,OAAO,IAAI,QAAQ;CACrB,GAAG,CACD,KACF,CAAC;AACH"}
package/dist/esm/index.js CHANGED
@@ -1,16 +1,18 @@
1
1
  import * as React from "react";
2
+
2
3
  function usePrevious(value) {
3
- const ref = React.useRef({
4
- value,
5
- previous: value
6
- });
7
- return React.useMemo(() => {
8
- if (ref.current.value !== value) {
9
- ref.current.previous = ref.current.value;
10
- ref.current.value = value;
11
- }
12
- return ref.current.previous;
13
- }, [value]);
4
+ const ref = React.useRef({
5
+ value,
6
+ previous: value
7
+ });
8
+ return React.useMemo(() => {
9
+ if (ref.current.value !== value) {
10
+ ref.current.previous = ref.current.value;
11
+ ref.current.value = value;
12
+ }
13
+ return ref.current.previous;
14
+ }, [value]);
14
15
  }
16
+
15
17
  export { usePrevious };
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePrevious","value","ref","useRef","previous","useMemo","current"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAEhB,SAASC,YAAeC,KAAA,EAAa;EAC1C,MAAMC,GAAA,GAAMH,KAAA,CAAMI,MAAA,CAAO;IAAEF,KAAA;IAAOG,QAAA,EAAUH;EAAM,CAAC;EAKnD,OAAOF,KAAA,CAAMM,OAAA,CAAQ,MAAM;IACzB,IAAIH,GAAA,CAAII,OAAA,CAAQL,KAAA,KAAUA,KAAA,EAAO;MAC/BC,GAAA,CAAII,OAAA,CAAQF,QAAA,GAAWF,GAAA,CAAII,OAAA,CAAQL,KAAA;MACnCC,GAAA,CAAII,OAAA,CAAQL,KAAA,GAAQA,KAAA;IACtB;IACA,OAAOC,GAAA,CAAII,OAAA,CAAQF,QAAA;EACrB,GAAG,CAACH,KAAK,CAAC;AACZ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,OAAO;CAC1B,MAAM,MAAM,MAAM,OAAO;EAAE;EAAO,UAAU;CAAM,CAAC;CACnD,OAAO,MAAM,cAAc;EACzB,IAAI,IAAI,QAAQ,UAAU,OAAO;GAC/B,IAAI,QAAQ,WAAW,IAAI,QAAQ;GACnC,IAAI,QAAQ,QAAQ;EACtB;EACA,OAAO,IAAI,QAAQ;CACrB,GAAG,CAAC,KAAK,CAAC;AACZ"}
@@ -1,16 +1,18 @@
1
1
  import * as React from "react";
2
+
2
3
  function usePrevious(value) {
3
- const ref = React.useRef({
4
- value,
5
- previous: value
6
- });
7
- return React.useMemo(() => {
8
- if (ref.current.value !== value) {
9
- ref.current.previous = ref.current.value;
10
- ref.current.value = value;
11
- }
12
- return ref.current.previous;
13
- }, [value]);
4
+ const ref = React.useRef({
5
+ value,
6
+ previous: value
7
+ });
8
+ return React.useMemo(() => {
9
+ if (ref.current.value !== value) {
10
+ ref.current.previous = ref.current.value;
11
+ ref.current.value = value;
12
+ }
13
+ return ref.current.previous;
14
+ }, [value]);
14
15
  }
16
+
15
17
  export { usePrevious };
16
18
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePrevious","value","ref","useRef","previous","useMemo","current"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAEhB,SAASC,YAAeC,KAAA,EAAa;EAC1C,MAAMC,GAAA,GAAMH,KAAA,CAAMI,MAAA,CAAO;IAAEF,KAAA;IAAOG,QAAA,EAAUH;EAAM,CAAC;EAKnD,OAAOF,KAAA,CAAMM,OAAA,CAAQ,MAAM;IACzB,IAAIH,GAAA,CAAII,OAAA,CAAQL,KAAA,KAAUA,KAAA,EAAO;MAC/BC,GAAA,CAAII,OAAA,CAAQF,QAAA,GAAWF,GAAA,CAAII,OAAA,CAAQL,KAAA;MACnCC,GAAA,CAAII,OAAA,CAAQL,KAAA,GAAQA,KAAA;IACtB;IACA,OAAOC,GAAA,CAAII,OAAA,CAAQF,QAAA;EACrB,GAAG,CAACH,KAAK,CAAC;AACZ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,OAAO;CAC1B,MAAM,MAAM,MAAM,OAAO;EAAE;EAAO,UAAU;CAAM,CAAC;CACnD,OAAO,MAAM,cAAc;EACzB,IAAI,IAAI,QAAQ,UAAU,OAAO;GAC/B,IAAI,QAAQ,WAAW,IAAI,QAAQ;GACnC,IAAI,QAAQ,QAAQ;EACtB;EACA,OAAO,IAAI,QAAQ;CACrB,GAAG,CAAC,KAAK,CAAC;AACZ"}
@@ -1,16 +1,18 @@
1
1
  import * as React from "react";
2
+
2
3
  function usePrevious(value) {
3
- var ref = React.useRef({
4
- value,
5
- previous: value
6
- });
7
- return React.useMemo(function () {
8
- if (ref.current.value !== value) {
9
- ref.current.previous = ref.current.value;
10
- ref.current.value = value;
11
- }
12
- return ref.current.previous;
13
- }, [value]);
4
+ var ref = React.useRef({
5
+ value,
6
+ previous: value
7
+ });
8
+ return React.useMemo(function() {
9
+ if (ref.current.value !== value) {
10
+ ref.current.previous = ref.current.value;
11
+ ref.current.value = value;
12
+ }
13
+ return ref.current.previous;
14
+ }, [value]);
14
15
  }
16
+
15
17
  export { usePrevious };
16
18
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePrevious","value","ref","useRef","previous","useMemo","current"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAEhB,SAASC,YAAeC,KAAA,EAAa;EAC1C,IAAAC,GAAM,GAAAH,KAAM,CAAAI,MAAM;IAKlBF,KAAO;IACLG,QAAQ,EAAAH;EACN;EACA,OAAAF,KAAI,CAAAM,OAAQ,aAAQ;IACtB,IAAAH,GAAA,CAAAI,OAAA,CAAAL,KAAA,KAAAA,KAAA;MACAC,GAAA,CAAAI,OAAW,CAAAF,QAAQ,GAAAF,GAAA,CAAAI,OAAA,CAAAL,KAAA;MACjBC,GAAA,CAAAI,OAAM,CAAAL,KAAA,GAAAA,KAAA;IACZ","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import * as React from \"react\";\nfunction usePrevious(value) {\n var ref = React.useRef({\n value,\n previous: value\n });\n return React.useMemo(function() {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [\n value\n ]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,OAAO;CAC1B,IAAI,MAAM,MAAM,OAAO;EACrB;EACA,UAAU;CACZ,CAAC;CACD,OAAO,MAAM,QAAQ,WAAW;EAC9B,IAAI,IAAI,QAAQ,UAAU,OAAO;GAC/B,IAAI,QAAQ,WAAW,IAAI,QAAQ;GACnC,IAAI,QAAQ,QAAQ;EACtB;EACA,OAAO,IAAI,QAAQ;CACrB,GAAG,CACD,KACF,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-previous",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.1",
4
4
  "files": [
5
5
  "src",
6
6
  "types",
@@ -33,7 +33,7 @@
33
33
  "clean:build": "tamagui-build clean:build"
34
34
  },
35
35
  "devDependencies": {
36
- "@tamagui/build": "2.7.7",
36
+ "@tamagui/build": "3.0.0-beta.643.1",
37
37
  "react": ">=19"
38
38
  },
39
39
  "peerDependencies": {