@newstudios/hook
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -27,2 +27,3 @@ "use strict"; | ||
}, []); | ||
(0, _react.useEffect)(() => unsubscribe, []); | ||
(0, _react.useEffect)(() => { | ||
@@ -35,3 +36,2 @@ const el = (0, _utils.getElement)(ref); | ||
return () => { | ||
unsubscribe(); | ||
dragCallbackRef.current = null; | ||
@@ -41,3 +41,3 @@ dragEndCallbackRef.current = null; | ||
} | ||
}, [ref]); | ||
}); | ||
(0, _useEvent.useEvent)(ref, 'mousedown', event => { | ||
@@ -44,0 +44,0 @@ if (event.button !== 0 || event.defaultPrevented) return; |
{ | ||
"name": "@newstudios/hook", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "common hooks for react", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
51483
1