Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@restart/hooks

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

2

es/useEventCallback.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]);
}
{
"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]);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc