@tamagui/use-force-update 1.124.17 → 1.124.18
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 +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -2
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +13 -1
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAEX,MAAM,eAC6B,OAAO,SAAW,KAEtD,OAAO,MAAM;AAAC;AAEb,SAAS,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAEX,MAAM,eAC6B,OAAO,SAAW,KAEtD,OAAO,MAAM;AAAC;AAEb,SAAS,iBAA6B;AAC3C,SAAO,eACH,OACC,aAAAA,QAAM,WAAW,CAAC,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE,CAAC;AAClD;",
|
|
5
5
|
"names": ["React"]
|
|
6
6
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": "AAAA,OAAO,WAAW;AAEX,MAAM,eAC6B,OAAO,SAAW,KAEtD,OAAO,MAAM;AAAC;AAEb,SAAS,
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAEX,MAAM,eAC6B,OAAO,SAAW,KAEtD,OAAO,MAAM;AAAC;AAEb,SAAS,iBAA6B;AAC3C,SAAO,eACH,OACC,MAAM,WAAW,CAAC,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE,CAAC;AAClD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","isServerSide","window","idFn","useForceUpdate","useReducer","x","Math","random"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAEX,MAAMC,YAAA,GAC6B,OAAOC,MAAA,GAAW;EAEtDC,IAAA,GAAOA,CAAA,KAAM,CAAC;AAEb,SAASC,eAAA,
|
|
1
|
+
{"version":3,"names":["React","isServerSide","window","idFn","useForceUpdate","useReducer","x","Math","random"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAEX,MAAMC,YAAA,GAC6B,OAAOC,MAAA,GAAW;EAEtDC,IAAA,GAAOA,CAAA,KAAM,CAAC;AAEb,SAASC,eAAA,EAA6B;EAC3C,OAAOH,YAAA,GACHE,IAAA,GACCH,KAAA,CAAMK,UAAA,CAAYC,CAAA,IAAMC,IAAA,CAAKC,MAAA,CAAO,GAAG,CAAC,EAAE,CAAC;AAClD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-force-update",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.18",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tamagui/build": "1.124.
|
|
34
|
+
"@tamagui/build": "1.124.18",
|
|
35
35
|
"react": "*"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
export const isServerSide =
|
|
3
|
+
export const isServerSide: boolean =
|
|
4
4
|
process.env.TAMAGUI_TARGET === 'web' && typeof window === 'undefined'
|
|
5
5
|
|
|
6
6
|
const idFn = () => {}
|
|
7
7
|
|
|
8
|
-
export function useForceUpdate() {
|
|
8
|
+
export function useForceUpdate(): () => void {
|
|
9
9
|
return isServerSide
|
|
10
10
|
? idFn
|
|
11
11
|
: (React.useReducer((x) => Math.random(), 0)[1] as () => void)
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAEA,OAAO,cAAMA;AAKb,OAAO,iBAAS",
|
|
3
|
+
"names": [
|
|
4
|
+
"isServerSide: boolean"
|
|
5
|
+
],
|
|
6
|
+
"sources": [
|
|
7
|
+
"src/index.ts"
|
|
8
|
+
],
|
|
9
|
+
"sourcesContent": [
|
|
10
|
+
"import React from 'react'\n\nexport const isServerSide: boolean =\n process.env.TAMAGUI_TARGET === 'web' && typeof window === 'undefined'\n\nconst idFn = () => {}\n\nexport function useForceUpdate(): () => void {\n return isServerSide\n ? idFn\n : (React.useReducer((x) => Math.random(), 0)[1] as () => void)\n}\n"
|
|
11
|
+
],
|
|
12
|
+
"version": 3
|
|
13
|
+
}
|