@restart/hooks
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -1,1 +0,1 @@ | ||
export default function useEventCallback<TCallback extends (...args: any[]) => any>(fn: TCallback): TCallback; | ||
export default function useEventCallback<TCallback extends (...args: any[]) => any>(fn?: TCallback | null): TCallback; |
@@ -15,4 +15,4 @@ "use strict"; | ||
return (0, _react.useCallback)(function () { | ||
return ref.current.apply(void 0, arguments); | ||
return ref.current && ref.current.apply(ref, arguments); | ||
}, [ref]); | ||
} |
{ | ||
"name": "@restart/hooks", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
@@ -1,1 +0,1 @@ | ||
export default function useEventCallback<TCallback extends (...args: any[]) => any>(fn: TCallback): TCallback; | ||
export default function useEventCallback<TCallback extends (...args: any[]) => any>(fn?: TCallback | null): TCallback; |
@@ -15,4 +15,4 @@ "use strict"; | ||
return (0, _react.useCallback)(function () { | ||
return ref.current.apply(void 0, arguments); | ||
return ref.current && ref.current.apply(ref, arguments); | ||
}, [ref]); | ||
} |
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
65980