reshow-hooks
Advanced tools
Comparing version 0.17.57 to 0.18.0
@@ -32,3 +32,3 @@ "use strict"; | ||
}, []); | ||
var stop = function stop() { | ||
var stop = (0, _react.useCallback)(function () { | ||
if (timer.current) { | ||
@@ -38,3 +38,3 @@ (0, _callFunc["default"])(act.stop, [timer.current]); | ||
} | ||
}; | ||
}, []); | ||
(0, _react.useEffect)(function () { | ||
@@ -49,6 +49,6 @@ return function () { | ||
*/ | ||
var run = function run(func, delay) { | ||
var run = (0, _react.useCallback)(function (func, delay) { | ||
stop(); | ||
timer.current = (0, _callFunc["default"])(act.run, [func, delay]); | ||
}; | ||
}, []); | ||
return [run, stop]; | ||
@@ -55,0 +55,0 @@ }; |
{ | ||
"version": "0.17.57", | ||
"version": "0.18.0", | ||
"name": "reshow-hooks", | ||
@@ -4,0 +4,0 @@ "repository": { |
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
51373
49
1549