reshow-hooks
Advanced tools
Comparing version 0.17.25 to 0.17.26
@@ -6,9 +6,14 @@ "use strict"; | ||
var _react = require("react"); | ||
//@ts-check | ||
/** | ||
* Check more info | ||
* https://beta.reactjs.org/learn/you-might-not-need-an-effect?#adjusting-some-state-when-a-prop-changes | ||
* @param {any} value | ||
* @param {any} [init] | ||
*/ | ||
var usePrevious = function usePrevious(value, init) { | ||
var data = (0, _react.useRef)({ | ||
cur: init | ||
cur: init, | ||
prev: null | ||
}); | ||
@@ -15,0 +20,0 @@ data.current = { |
{ | ||
"version": "0.17.25", | ||
"version": "0.17.26", | ||
"name": "reshow-hooks", | ||
@@ -4,0 +4,0 @@ "repository": { |
@@ -5,3 +5,5 @@ export default usePrevious; | ||
* https://beta.reactjs.org/learn/you-might-not-need-an-effect?#adjusting-some-state-when-a-prop-changes | ||
* @param {any} value | ||
* @param {any} [init] | ||
*/ | ||
declare function usePrevious(value: any, init: any): any; | ||
declare function usePrevious(value: any, init?: any): any; |
Sorry, the diff of this file is not supported yet
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
25511
735