@tamagui/use-force-update 1.0.1-rc.5 → 1.0.1-rc.6
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/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js.map +2 -2
- package/package.json +4 -4
- package/src/index.ts +2 -1
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { useReducer } from 'react'\n\nexport const isServerSide
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAEpB,MAAM,
|
|
4
|
+
"sourcesContent": ["import { useReducer } from 'react'\n\nexport const isServerSide =\n process.env.TAMAGUI_TARGET === 'web' && typeof window === 'undefined'\n\nconst idFn = () => {}\n\nexport function useForceUpdate() {\n return isServerSide ? idFn : (useReducer((x) => x + 1, 0)[1] as () => void)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAEpB,MAAM,eACX,QAAQ,IAAI,mBAAmB,SAAS,OAAO,WAAW;AAE5D,MAAM,OAAO,MAAM;AAAC;AAEb,SAAS,iBAAiB;AAC/B,SAAO,eAAe,WAAQ,yBAAW,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE;AAC5D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { useReducer } from 'react'\n\nexport const isServerSide
|
|
5
|
-
"mappings": "AAAA,SAAS,kBAAkB;AAEpB,MAAM,
|
|
4
|
+
"sourcesContent": ["import { useReducer } from 'react'\n\nexport const isServerSide =\n process.env.TAMAGUI_TARGET === 'web' && typeof window === 'undefined'\n\nconst idFn = () => {}\n\nexport function useForceUpdate() {\n return isServerSide ? idFn : (useReducer((x) => x + 1, 0)[1] as () => void)\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAEpB,MAAM,eACX,QAAQ,IAAI,mBAAmB,SAAS,OAAO,WAAW;AAE5D,MAAM,OAAO,MAAM;AAAC;AAEb,SAAS,iBAAiB;AAC/B,SAAO,eAAe,OAAQ,WAAW,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE;AAC5D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-force-update",
|
|
3
|
-
"version": "1.0.1-rc.
|
|
3
|
+
"version": "1.0.1-rc.6",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tamagui-build",
|
|
14
14
|
"watch": "tamagui-build --watch",
|
|
15
|
-
"lint": "
|
|
16
|
-
"lint:fix": "
|
|
15
|
+
"lint": "../../node_modules/.bin/rome check src",
|
|
16
|
+
"lint:fix": "../../node_modules/.bin/rome check --apply-suggested src",
|
|
17
17
|
"clean": "tamagui-build clean",
|
|
18
18
|
"clean:build": "tamagui-build clean:build"
|
|
19
19
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tamagui/build": "^1.0.1-rc.
|
|
28
|
+
"@tamagui/build": "^1.0.1-rc.6",
|
|
29
29
|
"react": "^18.2.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useReducer } from 'react'
|
|
2
2
|
|
|
3
|
-
export const isServerSide =
|
|
3
|
+
export const isServerSide =
|
|
4
|
+
process.env.TAMAGUI_TARGET === 'web' && typeof window === 'undefined'
|
|
4
5
|
|
|
5
6
|
const idFn = () => {}
|
|
6
7
|
|