@tamagui/use-force-update
Advanced tools
Comparing version 1.0.0-beta.10 to 1.0.0-beta.11
@@ -26,4 +26,3 @@ var __defProp = Object.defineProperty; | ||
function useForceUpdate() { | ||
const [_, forceUpdate] = (0, import_react.useReducer)((x) => x + 1, 0); | ||
return forceUpdate; | ||
return (0, import_react.useReducer)((x) => (x + 1) % Number.MAX_SAFE_INTEGER, 0)[1]; | ||
} | ||
@@ -30,0 +29,0 @@ __name(useForceUpdate, "useForceUpdate"); |
@@ -5,4 +5,3 @@ var __defProp = Object.defineProperty; | ||
function useForceUpdate() { | ||
const [_, forceUpdate] = useReducer((x) => x + 1, 0); | ||
return forceUpdate; | ||
return useReducer((x) => (x + 1) % Number.MAX_SAFE_INTEGER, 0)[1]; | ||
} | ||
@@ -9,0 +8,0 @@ __name(useForceUpdate, "useForceUpdate"); |
@@ -5,4 +5,3 @@ var __defProp = Object.defineProperty; | ||
function useForceUpdate() { | ||
const [_, forceUpdate] = useReducer((x) => x + 1, 0); | ||
return forceUpdate; | ||
return useReducer((x) => (x + 1) % Number.MAX_SAFE_INTEGER, 0)[1]; | ||
} | ||
@@ -9,0 +8,0 @@ __name(useForceUpdate, "useForceUpdate"); |
{ | ||
"name": "@tamagui/use-force-update", | ||
"version": "1.0.0-beta.10", | ||
"version": "1.0.0-beta.11", | ||
"typings": "types", | ||
@@ -19,3 +19,3 @@ "main": "dist/cjs", | ||
"devDependencies": { | ||
"@tamagui/build": "^1.0.0-beta.10", | ||
"@tamagui/build": "^1.0.0-beta.11", | ||
"react": "*" | ||
@@ -22,0 +22,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3694
56