@tamagui/use-previous 1.111.8 → 1.111.9

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.
@@ -4,13 +4,9 @@ function usePrevious(value) {
4
4
  value,
5
5
  previous: value
6
6
  });
7
- return React.useMemo(function() {
7
+ return React.useMemo(function () {
8
8
  return ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous;
9
- }, [
10
- value
11
- ]);
9
+ }, [value]);
12
10
  }
13
- export {
14
- usePrevious
15
- };
16
- //# sourceMappingURL=index.js.map
11
+ export { usePrevious };
12
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/use-previous/src/index.ts"],
4
- "mappings": "AAEA,YAAYA,WAAW;AAEhB,SAASC,YAAeC,OAAQ;AACrC,MAAMC,MAAMH,MAAMI,OAAO;IAAEF;IAAOG,UAAUH;EAAM,CAAA;AAKlD,SAAOF,MAAMM,QAAQ,WAAA;AACnB,WAAIH,IAAII,QAAQL,UAAUA,UACxBC,IAAII,QAAQF,WAAWF,IAAII,QAAQL,OACnCC,IAAII,QAAQL,QAAQA,QAEfC,IAAII,QAAQF;EACrB,GAAG;IAACH;GAAM;AACZ;",
5
- "names": ["React", "usePrevious", "value", "ref", "useRef", "previous", "useMemo", "current"]
6
- }
1
+ {"version":3,"names":["React","usePrevious","value","ref","useRef","previous"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAEhB,SAASC,YAAeC,KAAA,EAAU;EACvC,IAAAC,GAAM,GAAAH,KAAM,CAAAI,MAAM;IAKlBF,KAAO;IAOTG,QAAA,EAAAH","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-previous",
3
- "version": "1.111.8",
3
+ "version": "1.111.9",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,12 +18,12 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "1.111.8"
21
+ "@tamagui/build": "1.111.9"
22
22
  },
23
23
  "exports": {
24
24
  "./package.json": "./package.json",
25
25
  ".": {
26
- "react-native-import": "./dist/esm/index.native.mjs",
26
+ "react-native-import": "./dist/esm/index.native.js",
27
27
  "react-native": "./dist/cjs/index.native.js",
28
28
  "types": "./types/index.d.ts",
29
29
  "import": "./dist/esm/index.mjs",
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- function usePrevious(value) {
3
- var ref = React.useRef({
4
- value,
5
- previous: value
6
- });
7
- return React.useMemo(function () {
8
- return ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous;
9
- }, [value]);
10
- }
11
- export { usePrevious };
12
- //# sourceMappingURL=index.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","usePrevious","value","ref","useRef","previous"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAEhB,SAASC,YAAeC,KAAA,EAAU;EACvC,IAAAC,GAAM,GAAAH,KAAM,CAAAI,MAAM;IAKlBF,KAAO;IAOTG,QAAA,EAAAH","ignoreList":[]}