@cripty2001/utils 0.0.79 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-whispr.js +4 -0
- package/package.json +1 -1
package/dist/react-whispr.js
CHANGED
|
@@ -106,13 +106,17 @@ function useSynced(def, value, setValue) {
|
|
|
106
106
|
throw new Error('Either value and setValue must be provided, or both must be undefined');
|
|
107
107
|
if (value !== undefined && setValue !== undefined) {
|
|
108
108
|
(0, react_1.useEffect)(() => {
|
|
109
|
+
// console.log('syncing value downstream', value, '->', v);
|
|
109
110
|
if ((0, lodash_1.isEqual)(v, value))
|
|
110
111
|
return;
|
|
112
|
+
// console.log("SYNCED")
|
|
111
113
|
setV(value);
|
|
112
114
|
}, [value, v, setV]);
|
|
113
115
|
(0, react_1.useEffect)(() => {
|
|
116
|
+
// console.log('syncing value upstream', v, '->', value);
|
|
114
117
|
if ((0, lodash_1.isEqual)(v, value))
|
|
115
118
|
return;
|
|
119
|
+
// console.log("SYNCED");
|
|
116
120
|
setValue(v);
|
|
117
121
|
}, [v, value, setValue]);
|
|
118
122
|
}
|
package/package.json
CHANGED