react-bindings
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,2 +0,1 @@ | ||
/** We currently only use debug, but have included the other standard names as a warning for potential future use */ | ||
export interface Logger { | ||
@@ -3,0 +2,0 @@ debug?: (message?: any, ...optionalParams: any[]) => void; |
@@ -48,3 +48,4 @@ "use strict"; | ||
/** Only used when `detectInputChanges` is `false` and `triggerOnMount` is `'if-input-changed'` */ | ||
const lastChangeUids = (0, react_1.useRef)(!detectInputChanges && triggerOnMount === 'if-input-changed' ? makeChangeUidsString(stableAllBindings) : undefined); | ||
const lastChangeUids = (0, react_1.useRef)(); | ||
const limiter = (0, use_limiter_1.useLimiter)(Object.assign({ id: id !== null && id !== void 0 ? id : 'use-binding-effect', cancelOnUnmount: true }, limiterProps)); | ||
const checkAndUpdateIfInputChanged = (0, use_callback_ref_1.useCallbackRef)(() => { | ||
@@ -73,3 +74,2 @@ if (detectInputChanges) { | ||
}); | ||
const limiter = (0, use_limiter_1.useLimiter)(Object.assign({ id: id !== null && id !== void 0 ? id : 'use-binding-effect', cancelOnUnmount: true }, limiterProps)); | ||
const triggerCallback = (0, use_callback_ref_1.useCallbackRef)((needsInputChangeTrackingUpdate) => { | ||
@@ -89,2 +89,9 @@ if (needsInputChangeTrackingUpdate) { | ||
}); | ||
const isFirstRender = (0, react_1.useRef)(true); | ||
if (isFirstRender.current) { | ||
isFirstRender.current = false; | ||
if (!detectInputChanges && triggerOnMount === 'if-input-changed') { | ||
lastChangeUids.current = makeChangeUidsString(stableAllBindings); | ||
} | ||
} | ||
(0, react_1.useEffect)(() => { | ||
@@ -91,0 +98,0 @@ const removers = []; |
{ | ||
"name": "react-bindings", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Data bindings for React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
188936
2294