@tamagui/use-event
Advanced tools
Comparing version 1.111.8 to 1.111.9
@@ -1,3 +0,3 @@ | ||
export * from "./useEvent"; | ||
export * from "./useGet"; | ||
//# sourceMappingURL=index.js.map | ||
export * from "./useEvent.native.js"; | ||
export * from "./useGet.native.js"; | ||
//# sourceMappingURL=index.native.js.map |
@@ -1,11 +0,9 @@ | ||
import { useGet } from "./useGet"; | ||
import { useGet } from "./useGet.native.js"; | ||
function useEvent(callback) { | ||
return useGet(callback, defaultValue, !0); | ||
} | ||
var defaultValue = function() { | ||
var defaultValue = function () { | ||
throw new Error("Cannot call an event handler while rendering."); | ||
}; | ||
export { | ||
useEvent | ||
}; | ||
//# sourceMappingURL=useEvent.js.map | ||
export { useEvent }; | ||
//# sourceMappingURL=useEvent.native.js.map |
@@ -5,16 +5,13 @@ import { useIsomorphicLayoutEffect } from "@tamagui/constants"; | ||
var curRef = React.useRef(initialValue ?? currentValue); | ||
return useIsomorphicLayoutEffect(function() { | ||
return useIsomorphicLayoutEffect(function () { | ||
curRef.current = currentValue; | ||
}), React.useCallback(forwardToFunction ? function() { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) | ||
args[_key] = arguments[_key]; | ||
}), React.useCallback(forwardToFunction ? function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
var _curRef_current; | ||
return (_curRef_current = curRef.current) === null || _curRef_current === void 0 ? void 0 : _curRef_current.apply(null, args); | ||
} : function() { | ||
} : function () { | ||
return curRef.current; | ||
}, []); | ||
} | ||
export { | ||
useGet | ||
}; | ||
//# sourceMappingURL=useGet.js.map | ||
export { useGet }; | ||
//# sourceMappingURL=useGet.native.js.map |
{ | ||
"name": "@tamagui/use-event", | ||
"version": "1.111.8", | ||
"version": "1.111.9", | ||
"types": "./types/index.d.ts", | ||
@@ -21,7 +21,7 @@ "main": "dist/cjs", | ||
"devDependencies": { | ||
"@tamagui/build": "1.111.8", | ||
"@tamagui/build": "1.111.9", | ||
"react": "^18.2.0 || ^19.0.0" | ||
}, | ||
"dependencies": { | ||
"@tamagui/constants": "1.111.8" | ||
"@tamagui/constants": "1.111.9" | ||
}, | ||
@@ -31,3 +31,3 @@ "exports": { | ||
".": { | ||
"react-native-import": "./dist/esm/index.native.mjs", | ||
"react-native-import": "./dist/esm/index.native.js", | ||
"react-native": "./dist/cjs/index.native.js", | ||
@@ -34,0 +34,0 @@ "types": "./types/index.d.ts", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20977
75497
41
296
34
53
298
+ Added@tamagui/constants@1.111.9(transitive)
- Removed@tamagui/constants@1.111.8(transitive)
Updated@tamagui/constants@1.111.9