@plasmicapp/react-web 0.2.304 → 0.2.306
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/all.d.ts +1 -1
- package/dist/index.cjs.js +13 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +13 -13
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +4 -4
- package/skinny/dist/index.js +13 -13
- package/skinny/dist/index.js.map +1 -1
package/dist/react-web.esm.js
CHANGED
|
@@ -2379,18 +2379,6 @@ function useDollarState(specs) {
|
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
2381
|
}
|
|
2382
|
-
// For each spec with an initFunc, evaluate it and see if
|
|
2383
|
-
// the init value has changed. If so, reset its state.
|
|
2384
|
-
var resetSpecs = [];
|
|
2385
|
-
getStateCells($state, $$state.rootSpecTree).forEach(function (stateCell) {
|
|
2386
|
-
var _a;
|
|
2387
|
-
if (stateCell.initFunc) {
|
|
2388
|
-
var newInit = invokeInitFuncBackwardsCompatible(stateCell.initFunc, __assign({ $state: $state }, ((_a = stateCell.overrideEnv) !== null && _a !== void 0 ? _a : envFieldsAreNonNill(env))));
|
|
2389
|
-
if (!deepEqual(newInit, stateCell.initialValue)) {
|
|
2390
|
-
resetSpecs.push({ stateCell: stateCell });
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
});
|
|
2394
2382
|
var reInitializeState = function (stateCell) {
|
|
2395
2383
|
var _a, _b;
|
|
2396
2384
|
var newInit = initializeStateValue($$state, stateCell, $state);
|
|
@@ -2400,11 +2388,23 @@ function useDollarState(specs) {
|
|
|
2400
2388
|
}
|
|
2401
2389
|
};
|
|
2402
2390
|
useIsomorphicLayoutEffect(function () {
|
|
2391
|
+
// For each spec with an initFunc, evaluate it and see if
|
|
2392
|
+
// the init value has changed. If so, reset its state.
|
|
2393
|
+
var resetSpecs = [];
|
|
2394
|
+
getStateCells($state, $$state.rootSpecTree).forEach(function (stateCell) {
|
|
2395
|
+
var _a;
|
|
2396
|
+
if (stateCell.initFunc) {
|
|
2397
|
+
var newInit = invokeInitFuncBackwardsCompatible(stateCell.initFunc, __assign({ $state: $state }, ((_a = stateCell.overrideEnv) !== null && _a !== void 0 ? _a : envFieldsAreNonNill(env))));
|
|
2398
|
+
if (!deepEqual(newInit, stateCell.initialValue)) {
|
|
2399
|
+
resetSpecs.push({ stateCell: stateCell });
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
});
|
|
2403
2403
|
resetSpecs.forEach(function (_a) {
|
|
2404
2404
|
var stateCell = _a.stateCell;
|
|
2405
2405
|
reInitializeState(stateCell);
|
|
2406
2406
|
});
|
|
2407
|
-
}, [env.$props,
|
|
2407
|
+
}, [env.$props, $state, $$state, reInitializeState]);
|
|
2408
2408
|
useIsomorphicLayoutEffect(function () {
|
|
2409
2409
|
while ($$state.registrationsQueue.length) {
|
|
2410
2410
|
var _a = $$state.registrationsQueue.shift(), path = _a.path, f = _a.f, overrideEnv = _a.overrideEnv;
|