@radix-ui/react-use-effect-event
Advanced tools
Comparing version
@@ -33,3 +33,3 @@ "use strict"; | ||
__export(index_exports, { | ||
useEffectEvent: () => useEffectEvent2 | ||
useEffectEvent: () => useEffectEvent | ||
}); | ||
@@ -41,6 +41,3 @@ module.exports = __toCommonJS(index_exports); | ||
var React = __toESM(require("react")); | ||
function useEffectEvent2(callback) { | ||
if (typeof React["useEffectEvent ".trim().toString()] === "function") { | ||
return React.useEffectEvent(callback); | ||
} | ||
function useEffectEvent(callback) { | ||
const ref = React.useRef(() => { | ||
@@ -47,0 +44,0 @@ throw new Error("Cannot call an event handler while rendering."); |
{ | ||
"name": "@radix-ui/react-use-effect-event", | ||
"version": "0.0.0", | ||
"version": "0.0.1-rc.1744998730501", | ||
"license": "MIT", | ||
@@ -34,4 +34,4 @@ "source": "./src/index.ts", | ||
"typescript": "^5.7.3", | ||
"@repo/builder": "0.0.0", | ||
"@repo/eslint-config": "0.0.0", | ||
"@repo/builder": "0.0.0", | ||
"@repo/typescript-config": "0.0.0" | ||
@@ -38,0 +38,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
Sorry, the diff of this file is not supported yet
11338
-2.88%114
-4.2%