reshow-hooks
Advanced tools
Comparing version 0.17.17 to 0.17.18
@@ -12,4 +12,10 @@ "use strict"; | ||
var useSyncChange = function useSyncChange(value, setter, init) { | ||
if (value !== (0, _usePrevious["default"])(value, init)) { | ||
var useSyncChange = function useSyncChange(value, setter, init, comparator) { | ||
if (comparator === void 0) { | ||
comparator = function comparator(a, b) { | ||
return a !== b; | ||
}; | ||
} | ||
if (comparator(value, (0, _usePrevious["default"])(value, init))) { | ||
(0, _callFunc["default"])(setter, [value]); | ||
@@ -16,0 +22,0 @@ } |
{ | ||
"version": "0.17.17", | ||
"version": "0.17.18", | ||
"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
27508
760