@@ -3146,35 +3146,6 @@ __DEV__ &&
3146
3146
}
3147
3147
return workInProgressHook;
3148
3148
}
3149
- function unstable_useContextWithBailout(context, select) {
3150
- if (null === select) var JSCompiler_temp = readContext(context);
3151
- else {
3152
- JSCompiler_temp = currentlyRenderingFiber;
3153
- var value = context._currentValue2;
3154
- context = {
3155
- context: context,
3156
- memoizedValue: value,
3157
- next: null,
3158
- select: select,
3159
- lastSelectedValue: select(value)
3160
- };
3161
- if (null === lastContextDependency) {
3162
- if (null === JSCompiler_temp)
3163
- throw Error(
3164
- "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
3165
- );
3166
- lastContextDependency = context;
3167
- JSCompiler_temp.dependencies = {
3168
- lanes: 0,
3169
- firstContext: context,
3170
- _debugThenableState: null
3171
- };
3172
- JSCompiler_temp.flags |= 524288;
3173
- } else lastContextDependency = lastContextDependency.next = context;
3174
- JSCompiler_temp = value;
3175
- }
3176
- return JSCompiler_temp;
3177
- }
3178
3149
function createFunctionComponentUpdateQueue() {
3179
3150
return { lastEffect: null, events: null, stores: null, memoCache: null };
3180
3151
}
@@ -8611,19 +8582,8 @@ __DEV__ &&
8611
8582
a: for (; null !== list; ) {
8612
8583
var dependency = list;
8613
8584
list = fiber;
8614
- var i = 0;
8615
- b: for (; i < contexts.length; i++)
8585
+ for (var i = 0; i < contexts.length; i++)
8616
8586
if (dependency.context === contexts[i]) {
8617
- var select = dependency.select;
8618
- if (
8619
- null != select &&
8620
- null != dependency.lastSelectedValue &&
8621
- !checkIfSelectedContextValuesChanged(
8622
- dependency.lastSelectedValue,
8623
- select(dependency.context._currentValue2)
8624
- )
8625
- )
8626
- continue b;
8627
8587
list.lanes |= renderLanes;
8628
8588
dependency = list.alternate;
8629
8589
null !== dependency && (dependency.lanes |= renderLanes);
@@ -8721,37 +8681,19 @@ __DEV__ &&
8721
8681
);
8722
8682
workInProgress.flags |= 262144;
8723
8683
}
8724
- function checkIfSelectedContextValuesChanged(
8725
- oldComparedValue,
8726
- newComparedValue
8727
- ) {
8728
- if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) {
8729
- if (oldComparedValue.length !== newComparedValue.length) return !0;
8730
- for (var i = 0; i < oldComparedValue.length; i++)
8731
- if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0;
8732
- } else throw Error("Compared context values must be arrays");
8733
- return !1;
8734
- }
8735
8684
function checkIfContextChanged(currentDependencies) {
8736
8685
for (
8737
8686
currentDependencies = currentDependencies.firstContext;
8738
8687
null !== currentDependencies;
8739
8688
8740
8689
) {
8741
- var newValue = currentDependencies.context._currentValue2,
8742
- oldValue = currentDependencies.memoizedValue;
8743
8690
if (
8744
- null != currentDependencies.select &&
8745
- null != currentDependencies.lastSelectedValue
8746
- ) {
8747
- if (
8748
- checkIfSelectedContextValuesChanged(
8749
- currentDependencies.lastSelectedValue,
8750
- currentDependencies.select(newValue)
8751
- )
8691
+ !objectIs(
8692
+ currentDependencies.context._currentValue2,
8693
+ currentDependencies.memoizedValue
8752
8694
)
8753
- return !0;
8754
- } else if (!objectIs(newValue, oldValue)) return !0;
8695
+ )
8696
+ return !0;
8755
8697
currentDependencies = currentDependencies.next;
8756
8698
}
8757
8699
return !1;
@@ -15150,8 +15092,6 @@ __DEV__ &&
15150
15092
ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
15151
15093
enableUseResourceEffectHook &&
15152
15094
(ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError);
15153
- ContextOnlyDispatcher.unstable_useContextWithBailout =
15154
- throwInvalidHookError;
15155
15095
var HooksDispatcherOnMountInDEV = null,
15156
15096
HooksDispatcherOnMountWithHookTypesInDEV = null,
15157
15097
HooksDispatcherOnUpdateInDEV = null,
@@ -15317,14 +15257,6 @@ __DEV__ &&
15317
15257
destroy
15318
15258
);
15319
15259
});
15320
- HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function (
15321
- context,
15322
- select
15323
- ) {
15324
- currentHookNameInDev = "useContext";
15325
- mountHookTypesDev();
15326
- return unstable_useContextWithBailout(context, select);
15327
- };
15328
15260
HooksDispatcherOnMountWithHookTypesInDEV = {
15329
15261
readContext: function (context) {
15330
15262
return readContext(context);
@@ -15469,12 +15401,6 @@ __DEV__ &&
15469
15401
destroy
15470
15402
);
15471
15403
});
15472
- HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout =
15473
- function (context, select) {
15474
- currentHookNameInDev = "useContext";
15475
- updateHookTypesDev();
15476
- return unstable_useContextWithBailout(context, select);
15477
- };
15478
15404
HooksDispatcherOnUpdateInDEV = {
15479
15405
readContext: function (context) {
15480
15406
return readContext(context);
@@ -15621,14 +15547,6 @@ __DEV__ &&
15621
15547
destroy
15622
15548
);
15623
15549
});
15624
- HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function (
15625
- context,
15626
- select
15627
- ) {
15628
- currentHookNameInDev = "useContext";
15629
- updateHookTypesDev();
15630
- return unstable_useContextWithBailout(context, select);
15631
- };
15632
15550
HooksDispatcherOnRerenderInDEV = {
15633
15551
readContext: function (context) {
15634
15552
return readContext(context);
@@ -15775,14 +15693,6 @@ __DEV__ &&
15775
15693
destroy
15776
15694
);
15777
15695
});
15778
- HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function (
15779
- context,
15780
- select
15781
- ) {
15782
- currentHookNameInDev = "useContext";
15783
- updateHookTypesDev();
15784
- return unstable_useContextWithBailout(context, select);
15785
- };
15786
15696
InvalidNestedHooksDispatcherOnMountInDEV = {
15787
15697
readContext: function (context) {
15788
15698
warnInvalidContextAccess();
@@ -15953,13 +15863,6 @@ __DEV__ &&
15953
15863
destroy
15954
15864
);
15955
15865
});
15956
- InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout =
15957
- function (context, select) {
15958
- currentHookNameInDev = "useContext";
15959
- warnInvalidHookAccess();
15960
- mountHookTypesDev();
15961
- return unstable_useContextWithBailout(context, select);
15962
- };
15963
15866
InvalidNestedHooksDispatcherOnUpdateInDEV = {
15964
15867
readContext: function (context) {
15965
15868
warnInvalidContextAccess();
@@ -16132,13 +16035,6 @@ __DEV__ &&
16132
16035
destroy
16133
16036
);
16134
16037
});
16135
- InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout =
16136
- function (context, select) {
16137
- currentHookNameInDev = "useContext";
16138
- warnInvalidHookAccess();
16139
- updateHookTypesDev();
16140
- return unstable_useContextWithBailout(context, select);
16141
- };
16142
16038
InvalidNestedHooksDispatcherOnRerenderInDEV = {
16143
16039
readContext: function (context) {
16144
16040
warnInvalidContextAccess();
@@ -16306,13 +16202,6 @@ __DEV__ &&
16306
16202
destroy
16307
16203
);
16308
16204
});
16309
- InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout =
16310
- function (context, select) {
16311
- currentHookNameInDev = "useContext";
16312
- warnInvalidHookAccess();
16313
- updateHookTypesDev();
16314
- return unstable_useContextWithBailout(context, select);
16315
- };
16316
16205
var callComponent = {
16317
16206
"react-stack-bottom-frame": function (Component, props, secondArg) {
16318
16207
var wasRendering = isRendering;
@@ -17015,10 +16904,10 @@ __DEV__ &&
17015
16904
(function () {
17016
16905
var internals = {
17017
16906
bundleType: 1,
17018
- version: "19.1.0-www-classic-e06c72fc-20241215 ",
16907
+ version: "19.1.0-www-classic-d4287258-20241217 ",
17019
16908
rendererPackageName: "react-art",
17020
16909
currentDispatcherRef: ReactSharedInternals,
17021
- reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215 "
16910
+ reconcilerVersion: "19.1.0-www-classic-d4287258-20241217 "
17022
16911
};
17023
16912
internals.overrideHookState = overrideHookState;
17024
16913
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17052,7 +16941,7 @@ __DEV__ &&
17052
16941
exports.Shape = Shape;
17053
16942
exports.Surface = Surface;
17054
16943
exports.Text = Text;
17055
- exports.version = "19.1.0-www-classic-e06c72fc-20241215 ";
16944
+ exports.version = "19.1.0-www-classic-d4287258-20241217 ";
17056
16945
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
17057
16946
"function" ===
17058
16947
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
0 commit comments